php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24375 php.exe - Application error caused when I execute preg_replace
Submitted: 2003-06-28 12:10 UTC Modified: 2003-06-28 12:23 UTC
From: zvorygin at kenjitsu dot net Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 4.3.1 OS: Win2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zvorygin at kenjitsu dot net
New email:
PHP Version: OS:

 

 [2003-06-28 12:10 UTC] zvorygin at kenjitsu dot net
Description:
------------
I wrote a simple program which had to replace some strings in file using regular expressions and display the reult.
I used next sample templatesource_text here:
---------------------
<!--%seclevel_num="0"-->
<!--%description_text="Default header"-->
<html>
<head>
<title><!--#TITLE--></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
</head>
<body>
----------------------

Reproduce code:
---------------
-------------------
include("classes//class_template.php");
$templ= new template();
$templ->templatedir_text="template//default//";
$templ->loadTemplate("default_header.html");
echo($templ->applyTransform());
-------------------
function applyTransform $matches_array=NULL,$replace_array=NULL){
$repl=array("qwerty1","qwerty2","qwerty3","qwerty4");
$text=$this->templatesource_text;
return preg_replace("/<!--#(.*)-->/U",$repl,$text);
-------------------


Expected result:
----------------
I was expected to see may be warning, or error, but NOT application error.
Also when I use "preg_replace("/<!--%(.*)-->/U",$repl,$text);"
 everythjing is fine



Actual result:
--------------
php.exe-application error
The instruction at "0x10074d7e" referenced memory at "0x00a4a000" the memory could not be "read"...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-28 12:18 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
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.

4.3.2 was released already...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC