Regular Expression Problem

From: Date: Mon, 14 Feb 2000 16:24:26 +0000
Subject: Regular Expression Problem
Groups: php.version4 
Request: Send a blank email to php-version4+get-10255@lists.php.net to get a copy of this message
Platform: Sparc Solaris 7 Apache: 1.3.11 PHP: 4.0b3 Problem: regex Ok, the problem seems to be the regular expression engine withing php. When I do something like this: ------------------------------------------------------------------ <?php print "<HR>"; $test = "Hello World"; $brks = split("\s+",$test); for ($i = 0; i < count($brks); $i++) print $brks[0]."<HR>"; ?> ------------------------------------------------------------------ The, program goes into infinite loop. If I use "[ ]", the program starts to eat cpu and goes to 99% I tried to compile it regularly (and I get the problem). I tried --with-regex=apache and still have the same problem. I have tried to compile with --with-regex=system, but as I posted before, I get a compile error (I posted it below for reference). This seems to be some solaris issue since noone else (other some other solaris soul :) seems to be having these issues. What can be done to eliminate this compile error (any ideas welcome)? I am not an expert, but it seems to not like the regex.h that is installed. Could there be a compatibility issue with the Solaris regex library perhaps? Thanks, Victor ------------------------------------------------------------------ ===> src/modules/php4 gcc -c -I../../os/unix -I../../include -DSOLARIS2=270 -I/export/tmp/php-4.0b3 -I/export/tmp/php-4.0b3/libzend -I/expo rt/tmp/php-4.0b3/libzend -I/export/tmp/php-4.0b3 -DUSE_HSREGEX -DUSE_EXPAT -I../../lib/expat-lite ../../apaci mod_php 4.c In file included from ../../include/ap_config.h:1093, from /export/tmp/php-4.0b3/php.h:179, from mod_php4.c:23: ../../include/hsregex.h:41: warning: `REG_EXTENDED' redefined /usr/include/regex.h:32: warning: this is the location of the previous definition ../../include/hsregex.h:42: warning: `REG_ICASE' redefined /usr/include/regex.h:34: warning: this is the location of the previous definition ../../include/hsregex.h:43: warning: `REG_NOSUB' redefined /usr/include/regex.h:35: warning: this is the location of the previous definition ../../include/hsregex.h:44: warning: `REG_NEWLINE' redefined /usr/include/regex.h:33: warning: this is the location of the previous definition ../../include/hsregex.h:52: warning: `REG_BADPAT' redefined /usr/include/regex.h:68: warning: this is the location of the previous definition ../../include/hsregex.h:53: warning: `REG_ECOLLATE' redefined /usr/include/regex.h:56: warning: this is the location of the previous definition ../../include/hsregex.h:54: warning: `REG_ECTYPE' redefined /usr/include/regex.h:67: warning: this is the location of the previous definition ../../include/hsregex.h:55: warning: `REG_EESCAPE' redefined /usr/include/regex.h:57: warning: this is the location of the previous definition ../../include/hsregex.h:60: warning: `REG_BADBR' redefined /usr/include/regex.h:69: warning: this is the location of the previous definition ../../include/hsregex.h:61: warning: `REG_ERANGE' redefined /usr/include/regex.h:64: warning: this is the location of the previous definition ../../include/hsregex.h:62: warning: `REG_ESPACE' redefined /usr/include/regex.h:65: warning: this is the location of the previous definition ../../include/hsregex.h:63: warning: `REG_BADRPT' redefined /usr/include/regex.h:66: warning: this is the location of the previous definition ../../include/hsregex.h:74: warning: `REG_NOTBOL' redefined /usr/include/regex.h:49: warning: this is the location of the previous definition ../../include/hsregex.h:75: warning: `REG_NOTEOL' redefined /usr/include/regex.h:50: warning: this is the location of the previous definition In file included from ../../include/ap_config.h:1093, from /export/tmp/php-4.0b3/php.h:179, from mod_php4.c:23: ../../include/hsregex.h:25: conflicting types for `regoff_t' /usr/include/regex.h:27: previous declaration of `regoff_t' ../../include/hsregex.h:31: conflicting types for `regex_t' /usr/include/regex.h:100: previous declaration of `regex_t' ../../include/hsregex.h:35: conflicting types for `regmatch_t' /usr/include/regex.h:108: previous declaration of `regmatch_t' ../../include/hsregex.h:39: conflicting types for `regcomp' /usr/include/regex.h:131: previous declaration of `regcomp' ../../include/hsregex.h:69: conflicting types for `regerror' /usr/include/regex.h:133: previous declaration of `regerror' ../../include/hsregex.h:73: conflicting types for `regexec' /usr/include/regex.h:132: previous declaration of `regexec' ../../include/hsregex.h:83: conflicting types for `regfree' /usr/include/regex.h:134: previous declaration of `regfree' make[4]: *** [mod_php4.o] Error 1 make[3]: *** [all] Error 1 make[2]: *** [subdirs] Error 1 make[2]: Leaving directory `/export/tmp/apache_1.3.9/src' make[1]: *** [build-std] Error 2 make[1]: Leaving directory `/export/tmp/apache_1.3.9' make: *** [build] Error 2 ------------------------------------------------------------------

« previous php.version4 (#10255) next »