Bug #18528 Updated: Php crashes upon using eregi_replace
| From: | derick@php.net | Date: | Wed, 24 Jul 2002 07:46:51 +0000 |
| Subject: | Bug #18528 Updated: Php crashes upon using eregi_replace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14999@lists.php.net to get a copy of this message | ||
ID: 18528
Updated by: derick@php.net
Reported By: flash@daaw.org
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Redhat linux 7.1 (kernel 2.4.18)
PHP Version: 4.2.2
Previous Comments:
------------------------------------------------------------------------
[2002-07-24 03:45:25] flash@daaw.org
forgot! im using apache 1.3.26 with php compiled as DSO.
------------------------------------------------------------------------
[2002-07-24 03:44:52] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2002-07-24 03:44:03] flash@daaw.org
Below you see a snippet of a very basic news script that retrieves news
items from a file that is build up like this:
<id>:<user>:<date>:<topic>:<bigtext>
below is the script that crashes on eregi_replace, as soon as I comment
out the eregi_replace line and change $text1 to $text in the line
above, the script works.
--snip--
$n = getdata("$news");
$var1 = 0;
foreach ($n as $a) {
$var1++;
if ($var1 < 10) {
$topic = $a['4'];
$date = $a['3'];
$user = $a['2'];
$text1 = $a['5'];
$text = eregi_replace("&;&", ":", $text1);
echo "<TABLE bgColor=\"#ffffff\" border=0
cellPadding=0 cellSpacing=0 width=\"100%\"><TR><TD>
<TABLE bgColor=\"#cccccc\" border=0 cellPadding=1
cellSpacing=0 width=\"100%\"><TR><TD>
<TABLE bgColor=\"#eeeeee\" border=0 cellPadding=3
cellSpacing=0 width=\"100%\"><TR>
<TD align=center><FONT class=option color=\"#363636\">
<B> $topic.</B></FONT> By $user - $date</TD></TR>
</TABLE></TD></TR></TABLE>$text </TD></TR></TABLE>
<br><center><a href=\"#top\">Back to top</a>
--snip--
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18528&edit=1