Bug #16658: substr seems to alter the script when used on large strings
| From: | druid at evectors dot it | Date: | Wed, 17 Apr 2002 12:42:18 +0000 |
| Subject: | Bug #16658: substr seems to alter the script when used on large strings | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-5190@lists.php.net to get a copy of this message | ||
From: druid@evectors.it
Operating system: Linux 2.2.20
PHP version: 4.2.0
PHP Bug Type: Strings related
Bug description: substr seems to alter the script when used on large strings
Here is my first bug report ever, so please don't be so rude if I forgot
something or reported something already known :)
When I first use the function substr() to extract the first chars from the
beginning of a large string (around 50 kb) that is a HTML page and when I
print the whole string the script seems to stop. In example, I have a
script that has basically this calls:
printpage();
debuginfo();
Into printpage() is located the substr(); substr() is conditioned by an
"if" condition, so is not used every time; if it is used then debuginfo()
is not called or prints only few lines of debug, depending of the size of
the string that was "substr()ed". My personal workaround is like
$debugstr=debuginfo();
$htmlpage=printpage();
$finalpage=$htmlpage.$debugstr;
print $finalpage;
this works, but is not so elegant.
Hope you can solve this :)
Best regards
Daniele Duca, Evectors srl
--
Edit bug report at http://bugs.php.net/?id=16658&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16658&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16658&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16658&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16658&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16658&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16658&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16658&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16658&r=submittedtwice