|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18268 Compiling with --with-pcre-regex=shared breaks php module
Submitted: 2002-07-10 19:27 UTC Modified: 2002-07-12 20:15 UTC
From: neva at nevalabs dot org Assigned:
Status: Closed Package: PCRE related
PHP Version: 4.3.0-dev OS: Redhat 7.2
Private report: No CVE-ID: None
 [2002-07-10 19:27 UTC] neva at nevalabs dot org
Using --with-pcre-regex=shared with ./configure causes apache to give this message when starting:
/usr/local/apache_1.3.26/bin/apachectl start
Syntax error on line 237 of /usr/local/apache_1.3.26/conf/httpd.conf:
Cannot load /usr/local/apache_1.3.26/libexec/ into server: /usr/local/
apache_1.3.26/libexec/ undefined symbol: php_pcre_replace
/usr/local/apache_1.3.26/bin/apachectl start: httpd could not be started

This simple configure options leads to this problem:
./configure --with-config-file-path=/usr/local/apache_1.3.26/conf 
--includedir=/usr/include --with-apxs=/usr/local/apache_1.3.26/bin/apxs 
--disable-debug --enable-track-vars=yes --enable-memory-limit
--enable-inline-optimization --with-gnu-ld --with-pcre-regex=shared

Details about the system:
Redhat 7.2, with all updates (glibc-2.2.4)
Apache 1.3.26
PHP 4.2.1

Excluding --with-pcre-regex=shared from the ./configure line solves the problem, but this option used to work, at least with many older php 4.x versions.

If you need any other info, please let me know.

Claudio Neves


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-10 21:27 UTC]
Verified with latest CVS HEAD. The reason for this error
is that some places in PHP core use a function provided by the pcre extension..and when you build it as shared, that function is not available before you load the extension.

Do you have this extension loaded in php.ini ?

 [2002-07-10 23:27 UTC] neva at nevalabs dot org
I just confirmed it, loading or without loading pcre in php.ini gives the same error.
Tested also with --without-pcre-regex, and the problem disappears. Maybe the PHP core feature that uses the pcre function is disabled when using --without-pcre-regex. So maybe doing the same when using --with-pcre-regex=shared should solve the problem...(?)

Thanks for your attention and prompt response!
 [2002-07-12 20:15 UTC]
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at In case this was a documentation 
problem, the fix will show up soon at
In case this was a website problem, the change will show
up on the site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 24 13:03:38 2021 UTC