|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-02-20 07:17 UTC] vigna at dsi dot unimi dot it
The documentation states that the mbstring.func_overload mbstring.internal_encoding mbstring.http_input mbstring.http_output mbstring.substitute_character are PHP_INI_ALL. This is completely false--it is impossible to set them in a script (except maybe for internal_encoding, but the effect is not completely clear if you already have strings floating around). Apparently, all of them can be set using .htaccess except for func_overload, which must be set in php.ini. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 12:00:02 2025 UTC |
I can not get the result with you. I can change mbstring.http_output (and some others) in a script. This is a sample script, <?php print mb_http_output()."\n"; // default output encoding. mb_http_output("EUC-JP"); // set new encoding. // or ini_set("mbstring.http_output","EUC-JP"); print mb_http_output()."\n"; // output: "EUC-JP". ?> And, mbstring.func_overload is defined as PHP_INI_SYSTEM in the php manual, and is not defined as PHP_INI_ALL.For func_overload you are right--I misread. For what matters your example: you're right too. The problem is that I was checking using what's written in the docs, i.e., that ini_set() would return false on failure: php -q <?php print mb_http_output()."\n"; print ini_set("mbstring.http_output", "EUC-JP") === false; print "\n".mb_http_output()."\n"; ?> pass 1 EUC-JP BTW, this is really with PHP 4.2.2. So either the first or the second statement are returning the wrong value.On my linux box with php-4.3.1, the abobe small script works fine. Please check it again with php-4.3.1. <?php print mb_http_output()."\n"; print ini_set("mbstring.http_output", "EUC-JP") === false ? "FALSE" : "TRUE"; print "\n".mb_http_output()."\n"; // it returns: // SJIS // TRUE // EUC-JP ?>