Bug #15486 Updated: 'Invalid range end' with eregi_replace() under certain conditions.

From: Date: Mon, 01 Jul 2002 20:30:23 +0000
Subject: Bug #15486 Updated: 'Invalid range end' with eregi_replace() under certain conditions.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12711@lists.php.net to get a copy of this message
ID: 15486 Updated by: gray.php@mailnull.com Reported By: cahagn_o@epita.fr Status: Bogus Bug Type: *Regular Expressions Operating System: Linux PHP Version: 4.0.6 New Comment: We are seeing a similar problem under linux with glibc-common-2.2.4-13 under 7.2. Two instances of the same program. The first one compiles the pattern "^[5-?] fine but the 2nd instance of the same program fails. [5-9] works, [5-:] fails. [5-9:-?] works. If you comment out that test then another one later on fails. Compiling glibc with stubs removes the problem (of course). This seems to me to be some sort of shared library issue otherwise why would the 1st one work and the 2nd fail. Love to get some more information. Previous Comments: ------------------------------------------------------------------------ [2002-02-10 11:58:50] sander@php.net If it only fails with --with-regex=system then it's VERY likely not to be a bug in PHP, but in your system's regex library. Just compile PHP with it's own regexes. ------------------------------------------------------------------------ [2002-02-10 09:47:05] cahagn_o@epita.fr The testcase can be downloaded here: http://www.epita.fr/~cahagn_o/php/bug15486.txt (btw, this server doesn't show the bug, running PHP 4.0.6 as CGI: http://www.epita.fr/~cahagn_o/php/info.php for options). This really confirms the bug only occurs on Linux (RedHat ? glibc problem ?) when compiled '--with-regex=system'. ------------------------------------------------------------------------ [2002-02-10 09:33:59] cahagn_o@epita.fr There's an annoying bug with eregi_replace() which sometimes send Invalid Range End. This is reproducible with Linux RH7.2 and PHP 4.0.6 compiled '--with-regex=system'. I couldn't find this bug on bugs.php.net. This might be a known bug but, please, don't close it, I would really like to know on which systems the problem occurs exacly so as to add workaround on a Webmail client FAQ I wrote: http://nocc.sf.net/ It happens on this system (which I'm not the Webmaster of): http://www.okkaskole.no/~brr/test.php I couldn't reproduce the problem on Win2k+Apache 2.0.28+PHP 4.0.6 as CGI. Some other reports: http://www.webgenerator-x.com/support_forum.php3?op=viewtopictree&topic_id=55 http://www.squirrelmail.org/wiki/RedHatOutdatedGlibc I will attach testcase, which is long but the user on the above system couldn't reduce testcase. And I cannot reduce it myself as I don't have the bug on my system. The regexp might seem to be complicated but it runs very fine on many Web servers (NetBSD w/ Apache, Windows w/ Xitami, etc.) but some servers under certain conditions which makes it hard to reproduce. Fortunately, this time, it seems that I have a 100% reproducible testcase. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15486&edit=1

« previous php.bugs (#12711) next »