|  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
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
33 + 24 = ?
Subscribe to this entry?

 [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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-24 10:53 UTC]
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

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]
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/ mod_ssl/2.8.11 OpenSSL/0.9.6g FrontPage/ PHP/4.1.2 mod_throttle/3.1.2
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Nov 26 18:05:53 2022 UTC