php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23909 PHP 4.3.2 and Apache 2.0.46 Have Regex issues
Submitted: 2003-05-30 15:28 UTC Modified: 2003-05-30 21:50 UTC
From: mark at jumpweb dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.3.2 OS: FreeBSD 4.8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mark at jumpweb dot com
New email:
PHP Version: OS:

 

 [2003-05-30 15:28 UTC] mark at jumpweb dot com
When building PHP 4.3.2 with Apache 2.0.46 using the FreeBSD ports (w/minor hand updates to support .2/.46) I got compile errors on sapi_apache2.c that were caused by Apache2's httpd.h (included by util_filter.h) including the Apache pcreposix.h header which caused conflicts with the system regex.h header included earlier.  I commented out the httpd.h include temporarily and got PHP4 compiled but running phyMySqlAdmin I get a bunch of regex() errors whih I'll have to re-paste in a moment.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-30 15:32 UTC] edink@php.net
Just get rid of --with-regex=system in php configure line.
 [2003-05-30 15:42 UTC] mark at jumpweb dot com
Sorry - problem source file was sapi/apache2handler/sapi_apache2.c.

I filed this as a new bug as it seems unique to the combo of PHP 4.3.2 and Apache 2.0.46 - I didn't have a problem with Apache 2.0.45 and PHP 4.3.1 and in fact just build 4.3.1 with Apache 2.0.46 and had neither the compile or runtime error.

The runtime errors follow - they come from the login page of phpMyAdmin 2.5.1-rc1, there are a number of constructs like:

// Whether the os php is running on is windows or not
if (!defined('PMA_IS_WINDOWS')) {
    if (defined('PHP_OS') && eregi('win', PHP_OS)) {
        define('PMA_IS_WINDOWS', 1);
    } else {
        define('PMA_IS_WINDOWS', 0);
    }
}

It seems like every eregi() gets the error.

Warning: eregi(): unknown error code at offset 0 in /data/shared/www/webapps/phpMyAdmin/libraries/defines_php.lib.php on line 58

Warning: ereg(): unknown error code at offset 0 in /data/shared/www/webapps/phpMyAdmin/libraries/defines.lib.php on line 82

Warning: ereg(): unknown error code at offset 0 in /data/shared/www/webapps/phpMyAdmin/libraries/defines.lib.php on line 85

Warning: ereg(): unknown error code at offset 0 in /data/shared/www/webapps/phpMyAdmin/libraries/defines.lib.php on line 88

Warning: ereg(): unknown error code at offset 0 in /data/shared/www/webapps/phpMyAdmin/libraries/defines.lib.php on line 94

Warning: Cannot modify header information - headers already sent by (output started at /data/shared/www/webapps/phpMyAdmin/libraries/defines_php.lib.php:58) in /data/shared/www/webapps/phpMyAdmin/libraries/auth/cookie.auth.lib.php on line 89

Compile errors are:

/bin/sh /data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2/libtool --silent --preserve-dup-deps --mode=compile cc  -Isapi/apache2handler/ -I/data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2/sapi/apache2handler/ -DPHP_ATOM_INC -I/data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2/include -I/data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2/main -I/data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2 -I/usr/local/include/apache2 -I/data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2/Zend -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/freetype2 -I/usr/local/include/c-client -I/usr/local/include/mcal -I/usr/local/include/mysql -I/usr/local/include/pspell  -DNO_IDEA -DFREEBSD_THREAD_HACK -I/data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2/TSRM  -O -pipe -I/usr/local/include  -prefer-pic -c /data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2/sapi/apache2handler/sapi_apache2.c -o sapi/apache2handler/sapi_apache2.lo
In file included from /usr/local/include/apache2/httpd.h:87,
                 from /usr/local/include/apache2/util_filter.h:61,
                 from /data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2/sapi/apache2handler/sapi_apache2.c:40:
/usr/local/include/apache2/pcreposix.h:26: warning: `REG_ICASE' redefined
/usr/include/regex.h:63: warning: this is the location of the previous definition
/usr/local/include/apache2/pcreposix.h:27: warning: `REG_NEWLINE' redefined
/usr/include/regex.h:65: warning: this is the location of the previous definition
/usr/local/include/apache2/pcreposix.h:28: warning: `REG_NOTBOL' redefined
/usr/include/regex.h:91: warning: this is the location of the previous definition
/usr/local/include/apache2/pcreposix.h:29: warning: `REG_NOTEOL' redefined
/usr/include/regex.h:92: warning: this is the location of the previous definition
/usr/local/include/apache2/pcreposix.h:34: warning: `REG_EXTENDED' redefined
/usr/include/regex.h:62: warning: this is the location of the previous definition
/usr/local/include/apache2/pcreposix.h:35: warning: `REG_NOSUB' redefined
/usr/include/regex.h:64: warning: this is the location of the previous definition
In file included from /usr/local/include/apache2/httpd.h:87,
                 from /usr/local/include/apache2/util_filter.h:61,
                 from /data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2/sapi/apache2handler/sapi_apache2.c:40:
/usr/local/include/apache2/pcreposix.h:40: syntax error before `15'
/usr/local/include/apache2/pcreposix.h:53: syntax error before `12'
/usr/local/include/apache2/pcreposix.h:66: conflicting types for `regex_t'
/usr/include/regex.h:53: previous declaration of `regex_t'
/usr/local/include/apache2/pcreposix.h:70: conflicting types for `regoff_t'
/usr/include/regex.h:46: previous declaration of `regoff_t'
/usr/local/include/apache2/pcreposix.h:75: conflicting types for `regmatch_t'
/usr/include/regex.h:58: previous declaration of `regmatch_t'
/usr/local/include/apache2/pcreposix.h:79: conflicting types for `regcomp'
/usr/include/regex.h:99: previous declaration of `regcomp'
/usr/local/include/apache2/pcreposix.h:80: conflicting types for `regexec'
/usr/include/regex.h:102: previous declaration of `regexec'
/usr/local/include/apache2/pcreposix.h:81: conflicting types for `regerror'
/usr/include/regex.h:100: previous declaration of `regerror'
/usr/local/include/apache2/pcreposix.h:82: conflicting types for `regfree'
/usr/include/regex.h:103: previous declaration of `regfree'
*** Error code 1

Stop in /data/FreeBSD/4_8-RELEASE/ports/www/mod_php4/work/php-4.3.2.
*** Error code 1

Stop in /data/FreeBSD/4_8-RELEASE/ports/www/mod_php4.
*** Error code 1

Stop in /data/FreeBSD/4_8-RELEASE/ports/www/mod_php4.


The config command line is:

# ./configure  --with-apxs2=/usr/local/sbin/apxs --with-tsrm -pth --with-config-file-
path=/usr/local/etc --enable-versioning --with-regex=system --without-gd --witho
ut-mysql --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr/local --with-
jpeg-dir=/usr/local --with-png-dir=/usr/local --with-zlib --with-bz2=/usr --with
-crack=/usr/local --with-mcrypt=/usr/local --with-mhash=/usr/local --with-pdflib
=/usr/local --with-zlib-dir=/usr --with-jpeg-dir=/usr/local --with-png-dir=/usr/
local --with-tiff-dir=/usr/local --with-imap-ssl=/usr/local --with-mysql=/usr/local --with-dbase --with-gdbm=/usr/local --with-ldap=/usr/local --with-openssl=/usr --with-snmp=/usr/local --enable-ucd-snmp-hack --with-openssl=/usr --with-expat-dir=/usr/local --with-xmlrpc --enable-xslt --with-xslt-sablot=/usr/local --enable-wddx --with-dom=/usr/local --enable-ftp --with-curl=/usr/local --with-gettext=/usr/local --with-iconv=/usr/local -with-pspell=/usr/local --enable-yp --enable-bcmath --with-mcal=/usr/local --enable-sockets --enable-sysvsem --enable-sysvshm --enable-trans-sid --with-imap=/usr/local --prefix=/usr/local i386-portbld-freebsd4.8
 [2003-05-30 15:48 UTC] mark at jumpweb dot com
Removing the --with-regex=system solved the problem - Thanks.
 [2003-05-30 15:49 UTC] mark at jumpweb dot com
Closing as problem solved.
 [2003-05-30 21:50 UTC] sniper@php.net
Bogusing as this was not PHP bug.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 23 10:00:03 2025 UTC