You are not logged in.
Hello everybody,
I want to use nette framework for my PHP application. I have big problem with this framework - this framework needs PCRE with UTF-8 support.
I am using this version of Apache/2.2.16 (Unix)
and this version of PHP/5.3.3 with Suhosin-Patch.
It shows this error:
preg_match(): Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0
I found this simple test to check UTF-8 support:
<?php
if (@preg_match('/\pL/u', 'a') == 1) {
echo "PCRE unicode support is turned on.\n";
} else {
echo "PCRE unicode support is turned off.\n";
}
?>
I am confused with correct PCRE version.
phpinfo() shows me this informations
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 5.0 13-Sep-2004
and according to this page http://www.php.net/manual/en/pcre.installation.php, the version should be 8.02.
Thank you for help.
Best regards
Tomas
Offline
It seems that you have a wrong pcre lib installed. PHP is using the system pcre library on archlinux. (See --with-pcre-regex=/usr in official php package).
Check "pcre-config --version" on your console. My lib (using the up to date php and pcre packages) ist version 8.10.
-> Try pacman -Syu
Offline
I have latest system now and before too.
pcre-config --version gives me 8.10
But phpinfo() returns another version.
Tomas
Offline
Are you using the standard php package? Shows phpinfo() "--with-pcre-regex=/usr" under Configure Command? Do you use mod_php, php over fastcgi oder php-fpm?
Offline
Yes, I am using standard php package. phpinfo() shows --with-pcre-regex=/usr. I am using mod_php.
Tomas
Offline
Sounds similar to https://bugs.archlinux.org/task/9601. Even though the bug in apache was fixed a long time ago.
Offline
I found this bug. There was a tip to remove --with-regex from PKGBUILD for PHP but this does not help me.
What change in apache PKGBUILD was made for fixing this problem?
Tomas
Offline
Apache needs to be compiled with system pcre. I just checked this on my system and pcre is working fine with mod_php.
Offline
Thank you for you reply!
I am reading this configure manual http://httpd.apache.org/docs/2.2/progra … igure.html but i cant found any configure option about PCRE.
Tomas
Offline