ID: 48214 Comment by: b at ssel dot me Reported By: b at ssel dot me Status: Feedback Bug Type: mbstring related Operating System: CENTOS 4.7 i686 PHP Version: 5.2.9 New Comment:
The problem also shows on ubuntu 8.04 and php 5.2.6 and php 5.2.7 Previous Comments: ------------------------------------------------------------------------ [2009-05-09 20:59:37] b at ssel dot me Sorry the example was missing a ( $ ) $intsub = mb_substr($data, 0, 200); ------------------------------------------------------------------------ [2009-05-09 20:57:28] b at ssel dot me <?php $data = "test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here "; intsub = mb_substr($data, 0, 200); if ($intsub != $data){ $intsub = $intsub." ......"; } $intsub = mb_convert_encoding($intsub, "utf8", "auto"); echo $intsub; ?> ------------------------------------------------------------------------ [2009-05-09 20:53:24] j...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2009-05-09 20:51:41] b at ssel dot me Description: ------------ for some reason when using mb_substr or mb_convert_encoding php page dies without any error even when error reporting is set to error_reporting(E_ALL); that will happen only if we changed php.ini settings to: upload_max_filesize: 10M post_max_size: 10M max_execution_time:120 max_input_time: -1 I don't think those settings are related to mb_substr, but that what was happening on php 5.2.5 and still happening on 5.2.9 Reproduce code: --------------- $intsub = mb_substr($intwalker[0], 0, 200); if ($intsub != $intwalker[0]){ $intsub = $intsub." ......"; } } $intsub = mb_convert_encoding($intsub, "utf8", "auto"); Expected result: ---------------- to see a text of the only 200 first chars of $intwalker[0] Actual result: -------------- nothing, just a white page no errors at all even if error_reporting(E_ALL); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48214&edit=1