From: chris at inglenook dot co dot uk
Operating system: Redhat Linux 9
PHP version: 4.3.2
PHP Bug Type: *Compile Issues
Bug description: Cannot compile 4.3.2 with Apache 2.0.45/2.0.46 due to redeclaration
of regex
Compiling with the following configure line (in an rpm compile so that's
what the variables are):
%configure \
--prefix=%{_prefix} \
--with-config-file-path=%{_sysconfdir}/php \
--enable-force-cgi-redirect \
--enable-pic \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--with-db4 \
--with-curl \
--with-dom=%{_prefix} \
--with-exec-dir=%{_bindir} \
--with-freetype-dir=%{_prefix} \
--with-png-dir=%{_prefix} \
--with-gd \
--enable-gd-native-ttf \
--with-ttf \
--with-gdbm \
--with-gettext=shared \
--with-ncurses \
--with-gmp \
--with-iconv \
--with-jpeg-dir=%{_prefix} \
--with-openssl \
--with-png \
--with-pspell \
--with-regex=system \
--with-xml \
--with-expat-dir=%{_prefix} \
--with-zlib \
--with-layout=GNU \
--enable-bcmath \
--enable-debugger \
--enable-exif \
--with-pear=/usr/share/pear \
--enable-magic-quotes \
--enable-safe-mode \
--enable-sockets \
--enable-discard-path \
--enable-track-vars \
--enable-trans-sid \
--enable-yp \
--enable-wddx \
--without-oci8 \
--with-imap=shared \
--with-imap-ssl \
--with-kerberos=/usr/kerberos \
--with-ldap=shared \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--enable-ftp=shared \
--with-mysql=%{_prefix} \
--with-mcrypt \
%if %{oracle}
--with-oci8=shared \
%endif
--enable-memory-limit \
--enable-bcmath \
--enable-shmop \
--enable-versioning \
--enable-calendar \
--enable-dbx \
--enable-dio \
--enable-mbstring \
$*
This line works fine with php 4.3.1 and Apache 2.0.45 and 2.0.46.
PHP 4.3.2 introduces the apache2handler - this is where the problem comes
in.
The compile bombs out due to redeclaration or regex constants.
I think that this could be fixed by removing --with-regex=system
However, for PHP 4.3.1 and apache2filter the following line prevents this
problem:
if test "$PHP_SAPI" = "apache" || test "$PHP_SAPI" = "apache2filter";
then
This goes on to force the use of php regex. This is in the configure
script, and comes from ext/standard/config.m4
I'm submitting this as although there may be workarounds, if the problem
can be fixed so a compile script from 4.3.1 can also work with 4.3.2 then
it might stop others having the same trouble.
Patching this line to include apache2filter solves the compilation
problem:
if test "$PHP_SAPI" = "apache" || test "$PHP_SAPI" = "apache2filter" ||
test "$PHP_SAPI" = "apache2handler"; then
The patch i use before compilation:
--- php-4.3.2/ext/standard/config.m4 2003-06-03 08:28:23.000000000
+0100
+++ php-4.3.2/ext/standard/config.m4 2003-06-03 08:28:10.000000000
+0100
@@ -205,7 +205,7 @@
[
case $withval in
system)
- if test "$PHP_SAPI" = "apache" || test "$PHP_SAPI" =
"apache2filter"; then
+ if test "$PHP_SAPI" = "apache" || test "$PHP_SAPI" =
"apache2filter" || test "$PHP_SAPI" = "apache2handler"; then
REGEX_TYPE=php
else
REGEX_TYPE=system
--
Edit bug report at http://bugs.php.net/?id=24016&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24016&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=24016&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24016&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24016&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24016&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24016&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24016&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24016&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24016&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24016&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24016&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24016&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24016&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24016&r=gnused