FS#9601 - pcre no longer compiled with PCRE_UTF8
Attached to Project:
Arch Linux
Opened by barry o'rourke (barry) - Sunday, 17 February 2008, 19:58 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 08 March 2008, 12:41 GMT
Opened by barry o'rourke (barry) - Sunday, 17 February 2008, 19:58 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 08 March 2008, 12:41 GMT
|
Details
Description:
Ever since the recent update to pcre 7.6-3 my drupal based website hasn't worked properly on my archlinux box. I'm recieving the error message "this version of PCRE is not compiled with PCRE_UTF8 support at offset 0" Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: Installing drupal [drupal.org] should do the job. |
This task depends upon
Closed by Pierre Schmitz (Pierre)
Saturday, 08 March 2008, 12:41 GMT
Reason for closing: Fixed
Additional comments about closing: apache 2.2.8-2 and php 5.2.5-8 should be fine now.
Saturday, 08 March 2008, 12:41 GMT
Reason for closing: Fixed
Additional comments about closing: apache 2.2.8-2 and php 5.2.5-8 should be fine now.
$ pacman -Q pcre
pcre 7.6-3
$ pcretest -C
PCRE version 7.6 2008-01-28
Compiled with
UTF-8 support
Unicode properties support
Newline sequence is LF
\R matches all Unicode newlines
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack
From this thread: http://drupal.org/node/40961
it seems to be a problem with pcre/php.
<?php
if (!preg_match('/\p{L}/', 'รถ')) {
echo 'not OK';
} else {
echo 'OK';
}
?>
All that I can really say at the moment is that the site worked up until around the time of the pcre & php updates, and afterwards it reports back that error. I'll post an update in a couple of hours.
hubert httpd: PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: support for \P, \p, and \X has not been compiled at offset 1 in /home/httpd/html/pcre.php on line 2
cumberdale httpd: PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: support for \P, \p, and \X has not been compiled at offset 1 in /home/httpd/html/pcre.php on line 2
[barry@hubert ~]$ pacman -Q php
php 5.2.5-4
[barry@hubert ~]$ pacman -Q pcre
pcre 7.6-3
'--with-pcre-regex=/usr' is included in Configure Command
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 5.0 13-Sep-2004
Directive Local Value Master Value
pcre.backtrack_limit 100000 100000
pcre.recursion_limit 100000 100000
pacman -Q php pcre
php 5.2.5-4
pcre 7.6-3
php -i | grep -i pcre
Configure Command => './configure' '--prefix=/usr' '--sysconfdir=/etc/php' '--with-layout=GNU' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/conf.d' '--enable-inline-optimization' '--disable-debug' '--disable-rpath' '--disable-static' '--enable-shared' '--with-pcre-regex=/usr' '--disable-cgi' '--with-readline' '--enable-pcntl' '--with-pear=/usr/share/pear' '--with-openssl=shared' '--with-zlib=shared' '--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar=shared' '--with-curl=shared' '--enable-dba=shared' '--without-db2' '--without-db3' '--with-db4=shared' '--with-gdbm=shared' '--enable-dbase=shared' '--enable-exif=shared' '--enable-ftp=shared' '--with-gd=shared' '--enable-gd-native-ttf' '--with-jpeg-dir=shared,/usr' '--with-png-dir=shared,/usr' '--with-gettext=shared' '--with-imap=shared' '--with-imap-ssl=shared' '--with-ldap=shared' '--enable-mbstring=shared' '--with-mcrypt=shared' '--with-mysql=shared' '--with-mysql-sock=/tmp/mysql.sock' '--with-mysql=shared' '--with-mysqli=shared' '--with-ncurses=shared' '--with-unixODBC=shared,/usr' '--enable-pdo=shared' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-sqlite=shared' '--with-pgsql=shared' '--enable-shmop=shared' '--with-snmp=shared' '--enable-soap=shared' '--enable-sqlite-utf8=shared' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-tidy=shared' '--with-xsl=shared' '--enable-zip=shared' '--enable-posix=shared' '--enable-sockets=shared' '--enable-xml' '--with-ttf=shared' '--enable-session=shared' '--with-regex=php' '--enable-mbstring=all' '--enable-mbregex' '--enable-json=shared' '--with-iconv=shared' '--with-xmlrpc=shared' '--with-pspell=shared' '--with-freetype-dir=shared,/usr' '--with-mime-magic=shared'
pcre
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 7.6 2008-01-28
pcre.backtrack_limit => 100000 => 100000
pcre.recursion_limit => 100000 => 100000
Perhaps you should reinstall both packages and try the same with a fresh php.ini. I really do not know why you have an pcre lib from 2004.
When I run the same command as you on the console I get the same result you did -
[root@hubert /home/httpd/html]$ php -i | grep -i pcre
Configure Command => './configure' '--prefix=/usr' '--sysconfdir=/etc/php' '--with-layout=GNU' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/conf.d' '--enable-inline-optimization' '--disable-debug' '--disable-rpath' '--disable-static' '--enable-shared' '--with-pcre-regex=/usr' '--disable-cgi' '--with-readline' '--enable-pcntl' '--with-pear=/usr/share/pear' '--with-openssl=shared' '--with-zlib=shared' '--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar=shared' '--with-curl=shared' '--enable-dba=shared' '--without-db2' '--without-db3' '--with-db4=shared' '--with-gdbm=shared' '--enable-dbase=shared' '--enable-exif=shared' '--enable-ftp=shared' '--with-gd=shared' '--enable-gd-native-ttf' '--with-jpeg-dir=shared,/usr' '--with-png-dir=shared,/usr' '--with-gettext=shared' '--with-imap=shared' '--with-imap-ssl=shared' '--with-ldap=shared' '--enable-mbstring=shared' '--with-mcrypt=shared' '--with-mysql=shared' '--with-mysql-sock=/tmp/mysql.sock' '--with-mysql=shared' '--with-mysqli=shared' '--with-ncurses=shared' '--with-unixODBC=shared,/usr' '--enable-pdo=shared' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-sqlite=shared' '--with-pgsql=shared' '--enable-shmop=shared' '--with-snmp=shared' '--enable-soap=shared' '--enable-sqlite-utf8=shared' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-tidy=shared' '--with-xsl=shared' '--enable-zip=shared' '--enable-posix=shared' '--enable-sockets=shared' '--enable-xml' '--with-ttf=shared' '--enable-session=shared' '--with-regex=php' '--enable-mbstring=all' '--enable-mbregex' '--enable-json=shared' '--with-iconv=shared' '--with-xmlrpc=shared' '--with-pspell=shared' '--with-freetype-dir=shared,/usr' '--with-mime-magic=shared'
pcre
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 7.6 2008-01-28
pcre.backtrack_limit => 100000 => 100000
pcre.recursion_limit => 100000 => 100000
What I did:
I patched the builtin version of pcre to 7.6 and recompiled php statically with that version. This is more or less a wuick solution till I know why Apache/mod_php does not work with system pcre.
apache 2.2.8-2
php 5.2.5-8