|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-10 09:33 UTC] cahagn_o at epita dot 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
Just to add to my last email, I seem to have made this thing work. I had the following code if (!eregi("^([0-9a-z]+)(([0-9a-z\.-_]+)?)@([0-9a-z]+)\.([0-9a-z]+)(([0-9a-z_\.-]+)?)$", $formdata[email])) { and changed it to if (!eregi("^([0-9a-z]+)(([0-9a-z_\.-]+)?)@([0-9a-z]+)\.([0-9a-z]+)(([0-9a-z_\.-]+)?)$", $formdata[email])) { Spot the difference - note the placement of the underscore in the second grouping. The first statement failed regularly, the second works fine. Go figure !!! After having wasted an afternoon on this and last night fixing cookie processing because of the new p3p idiocy, I can actually get on and do something useful. P.S. Useful site, it is always nice to know that the problem is not of your own making.