php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35412 go-pear.bat fails if mbstring is configured at php.ini
Submitted: 2005-11-26 20:14 UTC Modified: 2006-01-08 15:55 UTC
From: mauroi at digbang dot com Assigned: cellog (profile)
Status: Closed Package: *General Issues
PHP Version: 5.1.0 OS: win32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
9 + 29 = ?
Subscribe to this entry?

 
 [2005-11-26 20:14 UTC] 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.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-26 20:24 UTC] tony2001@php.net
Assigned to the maintainer.
 [2005-11-26 20:25 UTC] iliaa@php.net
If you change mbstring.func_overload=6 to mbstring.func_overload=0, does the problem go away?
 [2005-11-26 21:02 UTC] 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 21:06 UTC] 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-28 01:38 UTC] cellog@php.net
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
 [2005-11-28 01:43 UTC] cellog@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

when you do this, please grab go-pear.phar directly from http://pear.php.net/go-pear.phar - and please do this no sooner than 1 hour after this message, as pear.php.net is synced once per hour with cvs
 [2005-12-06 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-01-08 15:55 UTC] mauroi at digbang dot com
Closed
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 19 23:03:36 2021 UTC