#35412 [Asn->Ana]: go-pear.bat fails if mbstring is configured at php.ini

From: Date: Mon, 28 Nov 2005 00:38:04 +0000
Subject: #35412 [Asn->Ana]: go-pear.bat fails if mbstring is configured at php.ini
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-89150@lists.php.net to get a copy of this message
ID: 35412 Updated by: cellog@php.net Reported By: mauroi at digbang dot com -Status: Assigned +Status: Analyzed Bug Type: *General Issues Operating System: win32 PHP Version: 5.1.0 Assigned To: cellog New Comment: I think I'll opt for door #3 which is to insert: if (function_exists('mb_internal_encoding')) { mb_internal_encoding('ASCII'); } at the top of the .phar Previous Comments: ------------------------------------------------------------------------ [2005-11-26 21:06:01] mauroi at digbang dot com Another workaround is to add a '-n' to the cli invocation inside of go-pear.bat That way no php.ini is used. ------------------------------------------------------------------------ [2005-11-26 21:02:15] mauroi at digbang dot com Yes. It works if I disable overloading. When I'm working with lobs (binary data in general) under this configuration I use mb_strlen($str, 'ASCII') instead of strlen($str). Otherwise, the variable would be treated as string and any unicode escape sequence would generate an error. Maybe a function called something like 'bytecount' could help to avoid this situation. Thanks. ------------------------------------------------------------------------ [2005-11-26 20:25:17] iliaa@php.net If you change mbstring.func_overload=6 to mbstring.func_overload=0, does the problem go away? ------------------------------------------------------------------------ [2005-11-26 20:24:47] tony2001@php.net Assigned to the maintainer. ------------------------------------------------------------------------ [2005-11-26 20:14:49] mauroi at digbang dot com Description: ------------ I have the following statements in my php.ini : mbstring.language=Neutral mbstring.encoding_translation=On mbstring.internal_encoding=UTF-8 mbstring.http_input=UTF-8 mbstring.http_output=pass mbstring.detect_order=auto mbstring.func_overload=6 mbstring.script_encoding=UTF-8 When I try to run go-pear.bat I get the error: "Warning: gzinflate(): data error in C:\Program Files\PHP5\PEAR\go-pear.phar on line 404 Notice: Undefined variable: size in C:\Program Files\PHP5\PEAR\go-pear.phar on l ine 407 Fatal error: Not valid gz file (size error != 0) in C:\Program Files\PHP5\PEAR\go-pear.phar on line 408". If I remove those php.ini lines everything works ok. Thanks. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35412&edit=1

« previous php.bugs (#89150) next »