Re: Fatal error: Call to undefined function preg_match()
| From: | Evert | Date: | Mon, 20 Mar 2006 11:42:00 +0000 |
| Subject: | Re: Fatal error: Call to undefined function preg_match() | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232233@lists.php.net to get a copy of this message | ||
M. Sokolewicz wrote:
> Barry wrote:
>> Evert wrote:
>>
>>> Hi all!
>>>
>>> Recently I am getting the following error on some of my PHP-enabled
>>> websites. I think it started when I went from PHP4 -> PHP5.
>>>
>>> Here is an example (from http://wos.poboxes.info/) :
>>>
>>>
>>> Fatal error: Call to undefined function preg_match() in
>>> /var/www/wos.poboxes.info/htdocs/classes/ConfigData.php on line 114
>>>
>>>
>>> What causes this? How can I fix it?
>>> FYI: I use Cherokee (not Apache...)
>>>
>>>
>>>
>>> Regards,
>>> Evert
>>
>> On some pages?
>> So it works on the other pages on the same webserver?
>>
>> Probably you have unset the function, or some file/php/include/script
>> does.
>> Best way to test that is to put preg_match at the first line.
>>
>> Is a htaccess causing trouble probably?
>
> Since when can you "unset" functions from within php scripts?? (except
> with specialized modules, which we'll just ignore for now).
>
> My guess here is that the PCRE-library was disabled during compilation
> of your PHP5 tree (check phpinfo for that). If so, you'll need to
> compile it in to have the functions.
You're right! :-)
It turned out that php5 was compiled without pcre-support. I have recompiled it, and now it works
like a charm! :-)
Thanks for the help! :-)
Regards,
Evert