PCRE Error on PHP 5.2.x
Recent upgrade to PHP 5.2.8 and PHP 5.2.9 have given me some error on the PCRE/Regex library. That is some sort of bugs I search through the net, so far I still can’t find fixed or patch. After continuously compiling and recompiling of PHP on FreeBSD. I finally found a temporary workaround on the issue.
After upgraded to PHP 5.2.9, I got this error on application that need to use regex/pcre library.
[Thu Jun 11 20:39:15 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: preg_replace() [function.preg-replace]: Internal pcre_fullinfo() error -3 in somefile.php on line 169
[Thu Jun 11 20:39:15 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: preg_match() [function.preg-replace]: Internal pcre_fullinfo() error -3 in somefile.php on line 275
If I run through phpinfo(), I can see PHP is compiled with –with-regex=php. Seem like it’s fine with php regex is configured, and according to PHP 5.2.7 to PHP 5.2.8 upgrade, PCRE is build in PHP package, but unfortunately the error shown is related to PCRE error.
The workaround is recompile the PHP with “-with-pcre-regex=yes”. After recompile your application should work like normal again.
Let me know if you have other workaround.
Related posts:
- How To Fix php5-pcre Ignored Package in FreeBSD Ports I guess most of the FreeBSD users having problem to...
- Error in suphp.c on line Am experimenting suphp on several servers for security reason. During...
- cairo-traps.c error in FreeBSD Ports cairo-traps.c: In function `_cairo_traps_init’: cairo-traps.c:62: `INT32_MAX’ undeclared (first use in...
- Razor2 Error: No such file or directory report requires authentication While doing Spam Report on SpamAssassin, I came across this...
- vim – error when starting problem : For some reason, starting up vim pops up...
- FreeBSD Port: Error Upgrading Perl 5.8.9 Usually I perform portupgrade daily on some of my FreeBSD...
- Cacti Spine Source Installation Error on FreeBSD Just noticed FreeBSD’s port still using old version of spine,...
- MySQL Cannot Connect with PHP in OSX I think some of you might have problem connecting to...