|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-02-27 10:12 UTC] php at strategma dot bg
Description:
------------
./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--prefix=/usr/local/php --enable-mbstring \
--with-mbregex
apache version 1.3.29
we set in .htaccess
PHP_VALUE mbstring.internal_encoding UTF-8
PHP_VALUE default_charset UTF-8
PHP_VALUE mbstring.http_output UTF-8
PHP_VALUE mbstring.encoding_translation On
PHP_VALUE mbstring.detect_order UTF-8
PHP_VALUE mbstring.func_overload 7
for specific site, but string functions on other web sites at the same
apache doest work (other sites use CP1251 enconding).
The string functions stop to work when anyone access the unicode site.
When we stop apache and start it again cp1251 string functions work properly.
we tryed the same configuration in the <VirtualHost> directive at apache's
httpd.conf for the UNICODE site
and in the <Directory> but it is the same result
With or without setlocale(LC_ALL,"bg_BG.CP1251") or
bg_BG or bg_BG.UTF-8 we have tryed all combinations and it still doesnt work.
thanks in advance
Reproduce code:
---------------
<?php
$v = '???? ? ????|test.php';
print substr($v,0,strpos($v,'|'));
?>
Expected result:
----------------
???? ? ????
Actual result:
--------------
????
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
I'm still seing a similar problem in PHP 4.4.4. The site has globally turned on mbstring.func_overload in php.ini. When turning it off in a .htaccess for a specific directory, the behaviour experienced by the scripts in that directory becomes random. Sometimes it works as expected (especially after a fresh start of apache), but most of the time the script is using the overloaded mbstring functions e.g. for substr, even though ini_get("mbstring.func_overload") returns 0. It looks like the save/restore in the mbstring module somehow gets confused and leaks overloaded functions between apache requests. Assuming this is a variant of the bug experienced by the original bug author, I'm posting this here and requesting a re-opening.I'm still experiencing this bug. On apache 2.0.59 with php 5.2.4, as well as php 4.4.x. It looks like mbstring.func_overload setting in .htaccess affects other virtualhosts and directories. I've tried with these in httpd.conf: <IfModule prefork.c> MaxRequestsPerChild 10 </IfModule> It works as expected for site A until I enter site B with mbstring.func_overload in .htaccess. Site B works as expected. Then i come back to site A and see unexpected results. I hit refresh few times and results back to normal. It looks like one request affects all other requests for specified child. When apache kill it after "MaxRequestPerChild" and spawn new child everything is working fine, until site B is requested. Is this bug somehow related to #43677? With one exception: ini_get("mbstring.func_overload") returns correct values - I mean values from config files.