php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19084 str_replace cannot handle strings > 32 kb
Submitted: 2002-08-24 10:31 UTC Modified: 2002-09-21 02:06 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: armandgs at hotmail dot com Assigned:
Status: No Feedback Package: Strings related
PHP Version: 4.2.2 OS: Windows 2000
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-08-24 10:31 UTC] armandgs at hotmail dot com
To generate the output of my scripts I generally execute code like:

echo str_replace("{body}", show_results(), implode ('', file ('template.html')));

so I put my output inside the page.

when the output generated by show_results() is > 32kb I get the page cannot be displayed error, random garbage in the output or just incomplete output.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-24 10:53 UTC] 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-09-21 02:06 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2002-12-29 05:01 UTC] gvz at infireal dot com
i am having the same problem, except i use the arrays in the input: str_replace($replar,$withar,$tpl);

the problem is sometimes only when you refresh a page that could point to it being an apache problem but it only happens with php pages.

i cannot produce a backtrace since it is on my host's server and i cannot reproduce it on my local dev machine: winxp, apache2, php 4.1.1

Server with problem: Apache/1.3.27 (Unix) mod_gzip/1.3.26.1a mod_ssl/2.8.11 OpenSSL/0.9.6g FrontPage/5.0.2.2510 PHP/4.1.2 mod_throttle/3.1.2
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 11:01:33 2024 UTC