Bug #15996 Updated: ereg doesn't match on Alpha but does on i586
| From: | mfischer@php.net | Date: | Tue, 19 Mar 2002 15:43:55 +0000 |
| Subject: | Bug #15996 Updated: ereg doesn't match on Alpha but does on i586 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-2882@lists.php.net to get a copy of this message | ||
ID: 15996
Updated by: mfischer@php.net
Reported By: tim@famdijkstra.org
-Status: Open
+Status: Bogus
Bug Type: *Regular Expressions
Operating System: Linux
PHP Version: 4.1.2
New Comment:
It basically means the regex library available on your system doesn't
work as expected. Bogusifying, this is not a PHP problem.
Previous Comments:
------------------------------------------------------------------------
[2002-03-19 06:37:24] tim@famdijkstra.org
I recompiled with --with-regex=php and that fixes the problem. Does
this mean another piece of software has a problem?
If so, what is it? I want to know so I can file a bug on that one.
grts Tim
------------------------------------------------------------------------
[2002-03-11 09:11:03] tim@famdijkstra.org
I was trying a set of scripts on my alpha intead of the i586 I used
before
(same php version same configure options). I had some problems and
found it had something to do with weird behaviour of ereg. It doesn't
match
in some cases where it should (and does on i586), the matches array is
left empty.
Some examples:
$p="blah link website bluh";
ereg("(.*)bla(.*)lin(.*)uh",$p,$regs1); //OK
isset($regs1) and print(implode("<br>",$regs1));
ereg("(.*)bla(.*)lin(.*)web(.*)uh",$p,$regs2); //NOT OK
isset($regs2) and print(implode("<br>",$regs2));
ereg("bla(.*)lin(.*)web(.*)uh",$p,$regs3); //NOT OK
isset($regs3) and print(implode("<br>",$regs3));
ereg("bla(.*)lin(.*)uh",$p,$regs4); //OK
isset($regs4) and print(implode("<br>",$regs4));
So only examples 1 and 4 have output. I can't find a real patern in
it..
I hope you can....
Tim
XXXXXXXXXXX
Compile options (I got from debian):
'../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs'
'--with-regex=system' '--with-config-file-path=/etc/php4/apache'
'--disable-rpath' '--disable-debug' '--enable-memory-limit'
'--enable-calendar' '--enable-sysvsem' '--enable-sysvshm'
'--enable-track-vars' '--enable-trans-sid' '--enable-bcmath'
'--with-bz2' '--enable-ctype' '--with-db2' '--with-iconv'
'--with-ndbm'
'--enable-exif' '--enable-filepro' '--enable-ftp'
'--with-gettext'
'--enable-mbstring' '--with-pcre-regex=/usr' '--enable-shmop'
'--enable-sockets' '--enable-wddx' '--with-xml=/usr'
'--with-expat-dir=/usr' '--enable-yp' '--with-zlib'
'--without-pgsql'
'--disable-static' '--with-layout=GNU' '--with-curl=shared,/usr'
'--with-dom=shared,/usr' '--with-zlib-dir=/usr'
'--with-gd=shared,/usr' '--with-jpeg-dir=shared,/usr'
'--with-xpm-dir=shared,/usr/X11R6' '--with-png-dir=shared,/usr'
'--with-freetype-dir=shared,/usr' '--with-imap=shared,/usr'
'--with-ldap=shared,/usr' '--with-mcal=shared,/usr'
'--with-mhash=shared,/usr' '--with-mm' '--with-mysql=shared,/usr'
'--with-recode=shared,/usr' '--enable-xslt'
'--with-xslt-sablot=shared,/usr' '--with-snmp=shared'
'--enable-ucd-snmp-hack' '--with-sybase-ct=shared,/usr'
'--with-ttf=shared,/usr' '--with-t1lib=shared,/usr'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15996&edit=1