ID: 48214
Updated by: [email protected]
-Summary: mb_substr or mb_convert_encoding not working
Reported By: b at ssel dot me
-Status: Open
+Status: Feedback
-Bug Type: *Unicode Issues
+Bug Type: mbstring related
Operating System: CENTOS 4.7 i686
PHP Version: 5.2.9
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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