php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47187 mbstring.func_overload in .htaccess has no effect
Submitted: 2009-01-22 04:15 UTC Modified: 2010-01-07 11:23 UTC
Votes:17
Avg. Score:4.7 ± 0.7
Reproduced:14 of 14 (100.0%)
Same Version:6 (42.9%)
Same OS:2 (14.3%)
From: antonius dot suryatenggara at aus dot fujixerox dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.2.8 OS: Windows Server 2003 Standard
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: antonius dot suryatenggara at aus dot fujixerox dot com
New email:
PHP Version: OS:

 

 [2009-01-22 04:15 UTC] antonius dot suryatenggara at aus dot fujixerox dot com
Description:
------------
Setting for mbstring.func_overload in .htaccess is not reflected.

For information, this works in PHP 5.2.6, 
but does not work in 5.2.8 or 5.2.9 snapshot (22 Jan 2009).

In php.ini: 
    mbstring.func_overload = 0

In httpd.conf: 
    AllowOverride All

In $WEBROOT/test folder put .htaccess:
    php_value mbstring.func_overload 7





Reproduce code:
---------------
<?php phpinfo() ?>


Expected result:
----------------
mbstring.func_overload
    Local Value = 7
    Master Value = 0

Actual result:
--------------
mbstring.func_overload
    Local Value = 0
    Master Value = 0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-22 13:43 UTC] jani@php.net
It's not possible to change it in perdir configs anymore. Fix for bug #43227 changed this. Apparently Rui forgot to document it..:)
 [2009-02-07 21:12 UTC] damager at seznam dot cz
It seems I've same problem on debian etch, apache 2.2.3-4+etch6 & php 5.2.0-8+etch13. When I set mbstring.func_overload in .htaccess it don't override php value.
 [2009-02-28 23:27 UTC] test at test dot ru
:(
 [2009-04-20 07:59 UTC] andre dot huebner at gmx dot de
will this feature be available again in future versions of php or by patch? if not the documentation should be changed cause it still shows the old behaviour.
Andre
 [2009-09-24 10:11 UTC] maxage at mail dot ru
I read comment in php.ini
; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
set mbstring.func_overload = 0,7
And all working well.
May be it wrong... but it's work.
 [2010-01-07 11:23 UTC] svn@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=293212
Log: Fixed bug #47187 (mbstring.func_overload in .htaccess has no effect)
 [2010-01-07 11:23 UTC] kalle@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.


 [2010-09-07 11:55 UTC] mail2010 at marc-richter dot info
Sorry, I don't get it. Does this mean that a "fix" has issued the behavior that one cannot set the mbstring.* - options somewhere else than in the global php.ini - file(s) anymore and this will stay this way, because it's wanted behavior? I don't understand how to deal with this then, since there are several Applications out there which _require_ this to be set to 7 (eGroupware www.egroupware.org for example), since others require this to be disabled (like phpmyadmin www.phpmyadmin.net for example).
How should one deal with this?
 [2010-09-07 13:08 UTC] mail2010 at marc-richter dot info
LOL ! ! ! ! !
I've not found this anywhere on the net, but I figured it out by try and error ;D
I think I've found the solution for everyone who has the problem to set different "mbstring.func_overload" - settings in different dirs:
Don't use php_value for setting this within your vhost - file: Simply use php_admin_value - this works! :D
But be aware of the fact that this cannot be used within a .htaccess - file. You have to insert s.th. like:
"php_admin_value mbstring.func_overload 7" inside your vhost - Files (between the <Directory></Directory> Area for example).
 [2011-05-19 14:55 UTC] b3q dot ru at ya dot ru
Man "mail2010 at marc-richter dot info" - you really help to me.

Big thx for you and other participants in the discussion. I don't understand r 
this solution true, but this work!
 [2012-07-20 08:22 UTC] conrad dot philipp at gmail dot com
I've solved the problem with this additional lines in the 'httpd.conf' :

<Directory "/your_path/egroupware">
php_admin_value mbstring.func_overload 7
Order allow,deny
Allow from all
</Directory>

<Directory "/your_path/egroupware/rpc.php">
php_admin_value mbstring.func_overload 0
Order allow,deny
Allow from all
</Directory>



That solved my problem. Don't make any changes at the 'mbtsring.func_overload'-line in the 'php.ini' or '.htaccess' -file
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Feb 17 18:01:25 2019 UTC