|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-02-24 22:03 UTC] lip at lip dot net dot ua
Description:
------------
PHP 5.2.5
Apache/2.2.8
If I use mbstring.func_overload in .htaccess
other virtual-host doesn't work.
For example:
<VirtualHost *:80>
DocumentRoot /var/www/php1
ServerName php1.net
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/php2
ServerName php2.net
</VirtualHost>
in /var/www/php1/.htaccess
php_value mbstring.func_overload 6
In this situation php2.net/mb.php doesn't work when I refresh few
times php1.net/mb.php and php2.net/mb.php
Reproduce code:
---------------
--mb.php---
<?php
$re0 = '(^|(\\\\\\\\)+|[^\])';
$dbname_to_test = 'galaD';
if (ereg($re0,$dbname_to_test))
{
var_dump ($dbname_to_test);
}
?>
Expected result:
----------------
galaD
Actual result:
--------------
Warning: mb_ereg() function.mb-ereg: mbregex compile err: premature end of char-class in /var/www/php2/mb.php
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 13:00:01 2025 UTC |
As workaround try to force mbstring.func_overload = 0 in your php.ini and use this patch. PHP5 unix_mbstring_func_overload.patch --- ext/mbstring/mbstring.c 2007-09-24 13:51:36.000000000 +0200 +++ ext/mbstring/mbstring.c 2007-12-04 18:00:10.023564681 +0100 @@ -765,8 +765,8 @@ PHP_INI_ENTRY("mbstring.script_encoding", NULL, PHP_INI_ALL, OnUpdate_mbstring_script_encoding) #endif /* ZEND_MULTIBYTE */ PHP_INI_ENTRY("mbstring.substitute_character", NULL, PHP_INI_ALL, OnUpdate_mbstring_substitute_character) - STD_PHP_INI_ENTRY("mbstring.func_overload", "0", PHP_INI_SYSTEM | - PHP_INI_PERDIR, OnUpdateLong, func_overload, zend_mbstring_globals, mbstring_globals) + STD_PHP_INI_ENTRY("mbstring.func_overload", "0", + PHP_INI_SYSTEM, OnUpdateLong, func_overload, zend_mbstring_globals, mbstring_globals) STD_PHP_INI_BOOLEAN("mbstring.encoding_translation", "0", PHP_INI_SYSTEM | PHP_INI_PERDIR, OnUpdate_mbstring_encoding_translation, PHP4 --- ext/mbstring/mbstring.c 2007-04-04 17:28:18.000000000 +0200 +++ ext/mbstring/mbstring.c 2007-12-04 18:05:29.363559316 +0100 @@ -815,8 +815,8 @@ PHP_INI_ENTRY("mbstring.script_encoding", NULL, PHP_INI_ALL, OnUpdate_mbstring_script_encoding) #endif /* ZEND_MULTIBYTE */ PHP_INI_ENTRY("mbstring.substitute_character", NULL, PHP_INI_ALL, OnUpdate_mbstring_substitute_character) - STD_PHP_INI_ENTRY("mbstring.func_overload", "0", PHP_INI_SYSTEM | - PHP_INI_PERDIR, OnUpdateInt, func_overload, zend_mbstring_globals, mbstring_globals) + STD_PHP_INI_ENTRY("mbstring.func_overload", "0", + PHP_INI_SYSTEM, OnUpdateInt, func_overload, zend_mbstring_globals, mbstring_globals) STD_PHP_INI_BOOLEAN("mbstring.encoding_translation", "0", PHP_INI_SYSTEM | PHP_INI_PERDIR, OnUpdate_mbstring_encoding_translation,