Bug #18528: Php crashes upon using eregi_replace
| From: | flash at daaw dot org | Date: | Wed, 24 Jul 2002 07:44:04 +0000 |
| Subject: | Bug #18528: Php crashes upon using eregi_replace | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-14996@lists.php.net to get a copy of this message | ||
From: flash@daaw.org
Operating system: Redhat linux 7.1 (kernel 2.4.18)
PHP version: 4.2.2
PHP Bug Type: Reproducible crash
Bug description: Php crashes upon using eregi_replace
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 bug report at http://bugs.php.net/?id=18528&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18528&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18528&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18528&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18528&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18528&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18528&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18528&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18528&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18528&r=globals