php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16976 preg_replace /e causes access violation
Submitted: 2002-05-02 16:36 UTC Modified: 2002-06-04 04:28 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: sean at caedmon dot net Assigned:
Status: Not a bug Package: Regexps related
PHP Version: 4.1.2 OS: Windows2000 / IIS5
Private report: No CVE-ID: None
 [2002-05-02 16:36 UTC] sean at caedmon dot net
this code causes an access violation on IIS5/Windows2000/PHP4.1.2

Reports are that it works fine with apache4.0.6 (OS unknown):

<?php

$str = "here's some code:\n [code]//yep;\n \$a = 0; if (\$a < 1) { echo 'moo &amp;'; }\n[/code]";
$str = preg_replace('/(\[code\])([^\[]*)(\[\/code\])/ie', "'<br><br>code:<hr size=\"1\"><pre>' . htmlspecialchars('\\2') . '<hr size=\"1\"></pre>'", $str);

echo $str;

?>

S

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-04 04:28 UTC] mfischer@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 15:01:27 2024 UTC