# [solved] cannot enable pcre support in php

## qxtr01

I cannot enable pcre support in php.

phpinfo() tells me that php was compiled with "--without-pcre-regex" flag despite the fact that I enabled pcre USE flag for php in package.use.

another weirdness is that phpinfo() tells me that php was build on April 23, but I compiled it today, April 25!

phpinfo():

```
PHP Version 5.2.9-pl2-gentoo

System    Linux silicon 2.6.29-gentoo-r1 #11 SMP Thu Apr 23 23:11:29 CEST 2009 x86_64

Build Date    Apr 23 2009 21:23:37

Configure Command    './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--disable-cli' '--enable-cgi' '--enable-fastcgi' '--disable-discard-path' '--disable-force-cgi-redirect' '--with-config-file-path=/etc/php/cgi-php5' '--with-config-file-scan-dir=/etc/php/cgi-php5/ext-active' '--without-pear' '--disable-bcmath' '--without-bz2' '--disable-calendar' '--disable-ctype' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--disable-dom' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--disable-ftp' '--without-gettext' '--without-gmp' '--disable-hash' '--without-iconv' '--disable-ipv6' '--disable-json' '--without-kerberos' '--disable-libxml' '--disable-mbstring' '--without-mcrypt' '--without-mhash' '--without-msql' '--without-mssql' '--without-ncurses' '--without-openssl' '--without-openssl-dir' '--disable-pcntl' '--without-pcre-regex' '--disable-pdo' '--without-pgsql' '--disable-posix' '--without-pspell' '--without-recode' '--disable-reflection' '--disable-simplexml' '--disable-shmop' '--without-snmp' '--disable-soap' '--disable-sockets' '--disable-spl' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xml' '--disable-xmlreader' '--disable-xmlwriter' '--without-xmlrpc' '--without-xsl' '--disable-zip' '--without-zlib' '--disable-debug' '--without-cdb' '--without-db4' '--disable-flatfile' '--without-gdbm' '--disable-inifile' '--without-qdbm' '--without-freetype-dir' '--without-t1lib' '--disable-gd-jis-conv' '--without-jpeg-dir' '--without-png-dir' '--without-xpm-dir' '--without-gd' '--without-mysqli' '--without-readline' '--without-libedit' '--disable-session' '--without-sqlite'

Server API    CGI/FastCGI

Virtual Directory Support    disabled

Configuration File (php.ini) Path    /etc/php/cgi-php5

Loaded Configuration File    /etc/php/cgi-php5/php.ini

Scan this dir for additional .ini files    /etc/php/cgi-php5/ext-active

additional .ini files parsed    (none)

PHP API    20041225

PHP Extension    20060613

Zend Extension    220060519

Debug Build    no

Thread Safety    disabled

Zend Memory Manager    enabled

IPv6 Support    disabled

Registered PHP Streams    php, file, data, http, ftp

Registered Stream Socket Transports    tcp, udp, unix, udg

Registered Stream Filters    string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed
```

emerge -pv php:

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

Calculating dependencies... done!

[ebuild   R   ] dev-lang/php-5.2.9-r2  USE="cgi pcre (-adabas) -apache2 -bcmath -berkdb (-birdstep) -bzip2 -calendar -cdb -cjk -cli -concurrentmodphp -crypt -ctype -curl -curlwrappers -db2 -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -exif -fastbuild (-fdftk) -filter (-firebird) -flatfile -force-cgi-redirect (-frontbase) -ftp -gd -gd-external -gdbm -gmp -hash -iconv -imap -inifile -interbase -iodbc -ipv6 (-java-external) -json -kerberos -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysql -mysqli -ncurses -nls -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -posix -postgres -qdbm -readline -recode -reflection -sapdb -session -sharedext -sharedmem -simplexml -snmp -soap -sockets (-solid) -spell -spl -sqlite -ssl -suhosin (-sybase) (-sybase-ct) -sysvipc -threads -tidy -tokenizer -truetype -unicode -wddx -xml -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip (-zip-external) -zlib" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
```

What should I try? Thanks.Last edited by qxtr01 on Sat Apr 25, 2009 8:52 pm; edited 1 time in total

----------

## nixnut

Are you sure php was emerged succesfully today? Perhaps it failed and you're still using an earlier succesful build

----------

## qxtr01

I'm pretty sure. But I noticed another weirdness.

phpinfo() tells me php was build in April 23 without pcre support, but php-cgi --info tells me php was build in April 25 with pcre support!

----------

## Mad Merlin

 *qxtr01 wrote:*   

> I'm pretty sure. But I noticed another weirdness.
> 
> phpinfo() tells me php was build in April 23 without pcre support, but php-cgi --info tells me php was build in April 25 with pcre support!

 

You're calling PHP through mod_php in Apache? Restart Apache for it to start using the new PHP.

----------

## qxtr01

I found the problem! I had to delete the various php.socket-<n> files in /tmp and restart lighttpd!

----------

