<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>blog@insidesystems.net: FreeBSD, PHP and Pecl</title>
    <link>http://blog.insidesystems.net/articles/2007/02/27/freebsd-php-and-pecl</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>FreeBSD, PHP and Pecl</title>
      <description>&lt;p&gt;I was helping move a legacy &lt;span class="caps"&gt;PHP&lt;/span&gt; app to a new server, and found it needed a &lt;span class="caps"&gt;PECL&lt;/span&gt; extension (dbx).&lt;/p&gt;


	&lt;p&gt;After installing &lt;span class="caps"&gt;PEAR&lt;/span&gt;, I got the following error:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
[root@machine php]# pecl install something

Fatal error: Call to undefined function preg_match() in /usr/local/share/pear/PEAR/Frontend/CLI.php on line 70
&lt;/code&gt;
&lt;/pre&gt;&lt;p&gt;It turns out that the problem is that within FreeBSD&amp;#8217;s installation of &lt;span class="caps"&gt;PECL&lt;/span&gt;, it calls &lt;span class="caps"&gt;PHP&lt;/span&gt; from the command line with the -n flag.  a.k.a. &amp;#8212;no-php-ini&lt;/p&gt;


	&lt;p&gt;This prevents /usr/local/etc/php/extensions.ini from getting loaded, and thus there is no &lt;span class="caps"&gt;PCRE&lt;/span&gt; support.&lt;/p&gt;


	&lt;p&gt;You can work around it by removing &amp;#8220;-n&amp;#8221; from inside the pecl script.&lt;/p&gt;</description>
      <pubDate>Tue, 27 Feb 2007 21:55:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:e1633eb1-7fbb-4ea9-af87-8e183f6ad67f</guid>
      <author>Kevin Way</author>
      <link>http://blog.insidesystems.net/articles/2007/02/27/freebsd-php-and-pecl</link>
      <category>FreeBSD</category>
      <category>System Administration</category>
      <category>PHP</category>
    </item>
  </channel>
</rss>
