php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15996 ereg doesn't match on Alpha but does on i586
Submitted: 2002-03-11 09:11 UTC Modified: 2002-03-19 10:43 UTC
From: tim at famdijkstra dot org Assigned:
Status: Not a bug Package: *Regular Expressions
PHP Version: 4.1.2 OS: Linux
Private report: No CVE-ID: None
 [2002-03-11 09:11 UTC] tim at famdijkstra dot 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'




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-19 06:37 UTC] tim at famdijkstra dot 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-19 10:43 UTC] mfischer@php.net
It basically means the regex library available on your system doesn't work as expected. Bogusifying, this is not a PHP problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 15 23:01:27 2024 UTC