Where do I find the PERL compatible functions for php

Kevin Kinsey kdk at daleco.biz
Tue Oct 2 21:31:20 PDT 2007


Bill Campbell wrote:
> On Tue, Oct 02, 2007, Andrew Falanga wrote:
>> Hi,
>>
>> Installed PHP 5 using the ports collection in preparation for installing
>> phpWebSite (a CMS system).  When trying to run the setup program (an
>> index.php) file on the server I get, "*Fatal error*: Call to undefined
>> function preg_match() in *
>> /usr/local/www/apache22/data/phpwebsite_1_3_1/setup/index.php* on line *136"
>> *.  I've found from the php.net web site that this is the PERL compatible
>> regular expression stuff.  Since it's not there, how would I get it?
> 
> This is a build-time option with php, and requires the pcre libraries.

Actually, it's been "split out" for some time now; you can get
PCRE support for your pre-existing PHP installation by installing
ports/devel/php5-pcre.  But, since most users want PHP to support 
many technologies/modules, the general thing to do is to install 
ports/lang/php5-extensions and, in this case, be sure that "pcre"
is checked during the configure stage (which, I believe, it is
by default); after that, devel/php5-pcre and several other php5-foo
ports will be added to your system, and PHP will suddenly grok
things like XML, SQL, and Perl-compatible regular expressions 
(or at least whatever you enabled).

HTH,

Kevin Kinsey
-- 
We are drowning in information but starved for knowledge.
		-- John Naisbitt, Megatrends


More information about the freebsd-questions mailing list