|
Posted by Shive on 08/16/07 18:01
Hello
I'm currently working on a very old and strange script written by
someone else.
The script has to generate a document list (very long, resulting HTML
>1MB), but instead of showing the page, it hangs after a while - my
browser shows a window asking me if I want do download the file (the php
one), but it's zero bytes in size. There are no error/warning messages.
I looked into the script and noticed, that it invokes ereg_replace in a
very long loop (one invocation for each document - there are hundreds of
them). I commented out ereg_replace and it seems OK - HTML file is being
generated BUT it loses some functionality.
Why multiple ereg_* invocation makes PHP crash? Shouldn't it execute for
a long time, but yet execute? Are there any system limits involved
(memory_limit=64M - seems OK, execution_time unlimited)? May the
ereg_replace function cause an overflow-of-something and I don't know
about the bug?
My PHP ver. is 4.3.10-21.
Thanks in advance for any help.
--
shive
Navigation:
[Reply to this message]
|