Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256051 - PHP preg_*() function won't work because of no PCRE_UTF8 support
Summary: PHP preg_*() function won't work because of no PCRE_UTF8 support
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-22 22:28 UTC by Felipe Hummel
Modified: 2009-01-22 23:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Hummel 2009-01-22 22:28:59 UTC
Hi, after emerging php I started to get this error after using preg_... functions:

Warning: preg_replace() [function.preg-replace]: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 1 in /var/www/localhost/htdocs/xml_highlight.php on line 5

How can I compile PCRE with PCRE_UTF8 support??

Reproducible: Always
Comment 1 Felipe Hummel 2009-01-22 23:01:07 UTC
Configure Command 	 './configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--enable-cli' '--enable-cgi' '--enable-fastcgi' '--disable-discard-path' '--disable-force-cgi-redirect' '--with-apxs2=/usr/sbin/apxs2' '--with-pcre-regex=/usr' '--with-config-file-path=/etc/php/-php5' '--with-config-file-scan-dir=/etc/php/-php5/ext-active' '--without-pear' '--enable-bcmath' '--with-bz2' '--disable-calendar' '--with-curl' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--disable-ftp' '--with-gettext' '--without-gmp' '--without-kerberos' '--enable-mbstring' '--with-mcrypt' '--without-mhash' '--without-msql' '--without-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--with-pgsql' '--disable-posix' '--without-pspell' '--without-recode' '--disable-shmop' '--without-snmp' '--enable-soap' '--enable-sockets' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--without-xmlrpc' '--without-xsl' '--disable-zip' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--with-db4' '--disable-flatfile' '--with-gdbm' '--disable-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=/usr/bin/mysql_config' '--without-pdo-dblib' '--with-pdo-mysql=/usr' '--without-pdo-odbc' '--with-pdo-pgsql' '--without-pdo-sqlite' '--with-readline' '--without-libedit' '--without-mm' '--without-sqlite' 
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2009-01-22 23:25:50 UTC
is dev-libs/libpcre currently compiled with USE="unicode"?
Please show the output of:
emerge --info
emerge -pv www-servers/apache dev-lang/php dev-libs/libpcre
Comment 3 Felipe Hummel 2009-01-22 23:33:20 UTC
emerge --info

Parse Error reading PROVIDE and USE in '/var/db/pkg/x11-base/xorg-x11-6.8.2-r6'
Possibly Invalid: 'virtual/x11 opengl? (virtual/opengl) opengl? (virtual/glu) virtual/xft'
Exception: missing space by parenthesis: '(v'

Portage 2.1.6.4 (default/linux/x86/2008.0, gcc-3.3.6, glibc-2.6.1-r0, 2.6.12-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.12-gentoo-r6-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-glibc2.0
Timestamp of tree: Thu, 22 Jan 2009 06:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.3.5, 2.4.2-r1
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.0_pre16-r3
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1, 1.10
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/terminfo"
CXXFLAGS="-O3 -march=pentium4"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://rsync.ufam.edu.br/"
LANG="pt_BR"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.ufam.edu.br/gentoo-portage/"
USE="acl apache2 berkdb bzip2 cli cracklib crypt ctype cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mudflap mysql mysqli ncurses nls nptl nptlonly openmp pam pcre perl postgres pppd python readline reflection session spl ssl sysfs tcpd truetype unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 4 Felipe Hummel 2009-01-22 23:34:07 UTC
emerge -pv www-servers/apache dev-lang/php dev-libs/libpcre

These are the packages that would be merged, in order:

Calculating dependencies  
Parse Error reading PROVIDE and USE in '/var/db/pkg/x11-base/xorg-x11-6.8.2-r6'
Possibly Invalid: 'virtual/x11 opengl? (virtual/opengl) opengl? (virtual/glu) virtual/xft'
Exception: missing space by parenthesis: '(v'

... done!
[ebuild   R   ] dev-libs/libpcre-7.8  USE="bzip2 cxx unicode zlib -doc" 0 kB [0]
[ebuild     UD] dev-db/libpq-8.0.15 [8.1.4] USE="nls pam readline ssl zlib -kerberos -pg-intdatetime% -threads" 0 kB [?=>0]
[ebuild  N    ] virtual/postgresql-base-8.0  0 kB [0]
[ebuild  NS   ] dev-libs/apr-util-1.3.4 [0.9.7] USE="berkdb gdbm mysql postgres -doc -freetds -ldap -odbc -sqlite -sqlite3" 0 kB [0]
[ebuild     U ] www-servers/apache-2.2.10 [2.0.55-r1] USE="ssl -debug -doc -ldap* (-selinux) -sni% -static% -suexec% -threads (-apache2%) (-mpm-leader%) (-mpm-peruser%) (-mpm-prefork%) (-mpm-threadpool%) (-mpm-worker%) (-no-suexec%) (-static-modules%)" APACHE2_MODULES="actions%* alias%* auth_basic%* authn_alias%* authn_anon%* authn_dbm%* authn_default%* authn_file%* authz_dbm%* authz_default%* authz_groupfile%* authz_host%* authz_owner%* authz_user%* autoindex%* cache%* dav%* dav_fs%* dav_lock%* deflate%* dir%* disk_cache%* env%* expires%* ext_filter%* file_cache%* filter%* headers%* include%* info%* log_config%* logio%* mem_cache%* mime%* mime_magic%* negotiation%* rewrite%* setenvif%* speling%* status%* unique_id%* userdir%* usertrack%* vhost_alias%* -asis% -auth_digest% -authn_dbd% -cern_meta% -charset_lite% -dbd% -dumpio% -ident% -imagemap% -log_forensic% -proxy% -proxy_ajp% -proxy_balancer% -proxy_connect% -proxy_ftp% -proxy_http% -substitute% -version%" APACHE2_MPMS="-event% -itk% -peruser% -prefork% -worker%" 0 kB [?=>0]
[ebuild  N    ] app-admin/apache-tools-2.2.10  USE="ssl" 0 kB [0]
[ebuild   R   ] dev-lang/php-5.2.8-r1  USE="apache2 bcmath berkdb bzip2 cgi cli crypt ctype curl fastbuild gdbm hash iconv ipv6 json mysql mysqli ncurses nls pcre pdo postgres readline reflection session simplexml soap sockets spl ssl truetype unicode xml xmlreader xmlwriter zlib -adabas -birdstep -calendar -cdb -cjk -concurrentmodphp -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd -gd-external -gmp -imap -inifile -interbase -iodbc (-java-external) -kerberos -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -oci8 -oci8-instant-client -odbc -pcntl -pic -posix -qdbm -recode -sapdb -sharedext -sharedmem -snmp -solid -spell -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -wddx -xmlrpc -xpm -xsl -yaz -zip -zip-external" 0 kB [0]

Total: 7 packages (1 upgrade, 1 downgrade, 2 new, 1 in new slot, 2 reinstalls), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [?] indicates that the source repository could not be determined
Comment 5 Peter Alfredsen (RETIRED) gentoo-dev 2009-01-22 23:43:49 UTC
Yeah, this is a known problem. Both apache and php previously embedded a version of php. This would work when both were using that. But there were other libraries involved too and they used the system copy. The correct thing of course is to use the system copy, so now both use the system copy, but you're using old apache with new php, which means you get the worst of both worlds. A symbol collision. If you update apache, this problem will probably disappear. Re-open if it does not.
Comment 6 Peter Alfredsen (RETIRED) gentoo-dev 2009-01-22 23:47:11 UTC
(In reply to comment #5)
> Yeah, this is a known problem. Both apache and php previously embedded a
> version of php.
^libpcre