On Thu, Jun 14, 2001 at 01:47:45PM -0000 , [EMAIL PROTECTED] wrote:
> From: [EMAIL PROTECTED]
> Operating system: Linux Debian
> PHP version: 3.0.17
so it is 3.0.17 or 3.0.18?
> PHP Bug Type: Scripting Engine problem
> Bug description: eregi DO NOT FIND expression if string too complicated and from
>$fcontents
>
> In some cases, eregi_replace doesn't work. I found it didn't worked
> when reading the a long/complicated line from a file :
>
> 1. I read $line from a file and $line becomes :
>
>
>"<tr><td>PPM</td><td>GrandBento</td><td>hi</td><td>3128</td><td>def</td><td>def</td><td><a
> href=\"PHP_url_me?req_modmain=showprod&req_modsub=view&req_id=1\">[view]</a> <a
>href=\"PHP_url_me?req_modmain=showprod&req_modsub=edit&req_id=1\">[edit]</a>
>[del]</td></tr>"
>
> 2. $url_myself = "http://1.1.1.249/admin/express/main.php3";
> and $line = eregi_replace ("PHP_url_me", $url_myself, $line);
>
> doesn't work !
>
> 3. For the other lines from the same file (shorter and with less
> special characters) it WORKS !
>
> AND that line is not tested the same as if I do
> $line2 = ...
> ($line <> $line2) ?!
>
> 4. in eregi_replace ($pattern, $replace, $string), are there special characters into
>$string ???? and even, why the same $line is not the same when read from a file
>
> CONCLUSION :
>
> I suppose the bug is more in $fcontents than ereg, BUT WHY ereg
> doesn't find a pattern which IS INTO the string ($line) ?
> Whatever the line can be, the pattern is there, so why doesn't
> it find it ?
>
> I suppose you don't need any other information, but just in case :
> - Debian Linux potato
> - PHP 3.0.18
selfcompiled or from a deb? if selfcompiled look at unstable php3. there is
a bug in php3's regex.h, which causes problems with large file support
(LFS). Also apache has this bug, which is fixed in the package (and maybe in
1.3.20 upstream).
Petr Cech
--
Debian GNU/Linux maintainer - www.debian.{org,cz}
[EMAIL PROTECTED]
Obviously the only rational solution to your problem is suicide.
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]