ID: 44237 Updated by: [EMAIL PROTECTED] Reported By: lip at lip dot net dot ua -Status: Open +Status: Feedback Bug Type: Apache2 related Operating System: Debian 4.0 PHP Version: 5.2.5 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: ------------------------------------------------------------------------ [2008-02-25 13:29:36] baco at infomaniak dot ch 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, ------------------------------------------------------------------------ [2008-02-24 22:23:08] lip at lip dot net dot ua Expected result: ---------------- php1.net - Warning: mb_ereg() function.mb-ereg: mbregex compile err: premature end of char-class in /var/www/php2/mb.php php2.net - galaD Actual result: -------------- php1.net - Warning php2.net - Warning ------------------------------------------------------------------------ [2008-02-24 22:03:13] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44237&edit=1