php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #22331 mbstring configuration variables are marked PHP_INI_ALL, but this is false.
Submitted: 2003-02-20 07:17 UTC Modified: 2004-01-19 11:15 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: vigna at dsi dot unimi dot it Assigned: hirokawa (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.3.0 OS: Linux
Private report: No CVE-ID: None
 [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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-20 07:22 UTC] vigna at dsi dot unimi dot it
Sorry: apparently they cannot even be modified in .htaccess--that was a mistake.
 [2003-02-28 04:54 UTC] moriyoshi@php.net
Assigning this task to Rui Hirokawa for fear it'd be forgotten. (Rui, feel free to reassign to me if you think it better)

 [2003-03-01 01:25 UTC] hirokawa@php.net
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.

 [2003-03-02 11:05 UTC] vigna at dsi dot unimi dot it
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.
 [2003-03-20 19:13 UTC] hirokawa@php.net
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
?>
 [2004-01-19 11:15 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:12 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=3cc1ac9a228e75d052000aa281ed6d53e9701406
Log: fix #22331
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Aug 04 20:00:02 2025 UTC