[SRU] PHP 5.2.10 zlib bug remains for 32bit

Bug #451314 reported by Chuck Burgess
192
This bug affects 50 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Won't Fix
Undecided
Chuck Short
php5 (Ubuntu)
Fix Released
Medium
Chuck Short
Karmic
Fix Released
Medium
Chuck Short

Bug Description

Binary package hint: php5

The zlib bug in PHP 5.2.10 that was fixed in 5.2.11 was patched into php5 5.2.10.dfsg.1-2ubuntu5, but the bug's effect is still visible when using PEAR:

(*** attempt to install a PEAR package via the "pear" command, with default behavior of "download TGZ file" ***)

$ sudo pear -vvv install Console_CommandLine
Notice: file_exists(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1517

Notice: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1527

Notice: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1527
Downloading "http://pear.php.net/get/Console_CommandLine-1.1.0.tgz"
downloading Console_CommandLine-1.1.0.tgz ...
Starting to download Console_CommandLine-1.1.0.tgz (37,554 bytes)
..........done: 37,554 bytes

Warning: unlink(/tmp/glibctestLHQgkX): No such file or directory in System.php on line 206

(*** installation dies silently after the TGZ is downloaded ***)

(*** try it via the -Z option, which tells PEAR to download TAR instead of TGZ ***)

$ sudo pear -vvv install -Z Console_CommandLine
Notice: file_exists(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1517

Notice: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1527

Notice: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1527
Downloading "http://pear.php.net/get/Console_CommandLine-1.1.0.tar"
downloading Console_CommandLine-1.1.0.tar ...
Starting to download Console_CommandLine-1.1.0.tar (Unknown size)
............................................................done: 290,304 bytes
adding to transaction: mkdir /usr/share/php/Console/CommandLine
+ create dir /usr/share/php/Console/CommandLine
+ mkdir /usr/share/php/Console/CommandLine
doing 1 substitution(s) for /usr/share/php/Console/CommandLine/Action.php
md5sum ok: /usr/share/php/Console/CommandLine/Action.php
 ... (*** many more lines of per-file output ***) ...
+ mv /usr/share/php/Console/.tmpCommandLine.php /usr/share/php/Console/CommandLine.php
successfully committed 263 file operations
install ok: channel://pear.php.net/Console_CommandLine-1.1.0

Warning: unlink(/tmp/glibctestLehyvK): No such file or directory in System.php on line 206

(*** note the "install ok" ***)

This bug has *not* been seen via the #pear testers using amd64 systems... it has only been seen on i686 systems. This point was true also with the previous -ubuntu4 package.

*** Also note that the -Z workaround will *not* work successfully while the symlink bug (#451277) exists, as the symlink bug alone is enough to cause a PEAR package installation to fail.

Bug Report Characteristics:

1)
$ uname -a
Linux izi-desktop 2.6.31-13-generic #45-Ubuntu SMP Tue Oct 13 02:08:03 UTC 2009 i686 GNU/Linux

2)
 $ apt-cache policy php-pear
 php-pear:
   Installé : 5.2.10.dfsg.1-2ubuntu5
   Candidat : 5.2.10.dfsg.1-2ubuntu5
  Table de version :
  *** 5.2.10.dfsg.1-2ubuntu5 0
         500 http://archive.ubuntu.com karmic/main Packages
         100 /var/lib/dpkg/status

3)
"sudo pear install {packagename}" should succeed with "install ok", without needing to add the "-Z" arg

4)
The install command silently dies after the TGZ file is downloaded ("..........done: 37,554 bytes")

=================
Karmic release notes:

Installing PEAR modules on i386 fails

When installing pear modules on an i386 system the installation will silently fail. The work around is to use the -Z option to install a pear module:

sudo pear install -Z <pear module>

A fix for this issue is expected to be provided in a post-release update immediately after the Ubuntu 9.10 release.

=================

Revision history for this message
Till Klampaeckel (till-php) wrote :

Just adding the bug Chuck referenced directly:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/451277

Revision history for this message
Martin Bogomolni (martinbogo) wrote :

This may be another related bug : https://bugs.launchpad.net/ubuntu/+source/zlib/+bug/439407

Either this is coming from upstream, or it's an error on the part of the ubuntu packaging in karmic. php5-zlib is missing (extension zlib.so) in Karmic Beta, and affects various other plugins. This is annoying on desktop, and critical for server.

Revision history for this message
Chuck Burgess (ashnazg) wrote :

There was a zlib bug in PHP 5.2.10 that was fixed in 5.2.11, which zul backported to Ubuntu's 5.2.10 yesterday (php5 5.2.10.dfsg.1-2ubuntu5), but the PEAR symptom relating to zlib (this bug) seems to remain.

If bug #439407 is correct in that the zlib.so extension file fails to install alongside PHP, it's possible that could explain this PEAR issue.

Revision history for this message
Chuck Burgess (ashnazg) wrote :

New bug against php5 regarding "missing zlib" -- bug #451405

Revision history for this message
Chuck Short (zulcss) wrote :

Im trying to find a fix for this thanks for the bug report.

Regards
chuck

Revision history for this message
Chuck Short (zulcss) wrote :

For those who are chomping at the bit for the (possible) fix to this. Can you try the version in my ppa (http://launchpad.net/~zulcss/+archive) when it is built?

Thanks
chuck

Changed in php5 (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Scott Evans (vk7hse) wrote :

Chuck, your package failed to build :(

Revision history for this message
Chuck Short (zulcss) wrote :

Ok I uploaded a new version can you guys test that?

Regards
chuck

Revision history for this message
Gabor Halaszvari (g-halaszvari) wrote :

It still does not work for me. :(

$ apt-cache policy php-pear
php-pear:
  Telepítve: 5.2.10.dfsg.1-2ubuntu6~ppa2
  Jelölt: 5.2.10.dfsg.1-2ubuntu6~ppa2
  Verziótáblázat:
 *** 5.2.10.dfsg.1-2ubuntu6~ppa2 0
        500 http://ppa.launchpad.net karmic/main Packages
        100 /var/lib/dpkg/status
     5.2.10.dfsg.1-2ubuntu5 0
        500 http://archive.ubuntu.com karmic/main Packages

$ pear -vvvvv install Structures_Graph

Notice: file_exists(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1517

Notice: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1527

Notice: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1527
Downloading "http://pear.php.net/get/Structures_Graph-1.0.3.tgz"
downloading Structures_Graph-1.0.3.tgz ...
Starting to download Structures_Graph-1.0.3.tgz (30,191 bytes)
.........done: 30,191 bytes

Warning: unlink(/tmp/glibctestZmtyzp): No such file or directory in System.php on line 206

Revision history for this message
izi (izimobil) wrote :

It doesn't work for me neither:

$ php -v
PHP 5.2.10-2ubuntu6~ppa2 with Suhosin-Patch 0.9.7 (cli) (built: Oct 19 2009 19:11:29)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

$ pear version
PEAR Version: 1.9.0
PHP Version: 5.2.10-2ubuntu6~ppa2
Zend Engine Version: 2.2.0
Running on: Linux izi-desktop 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686

$ sudo pear install Console_CommandLine
downloading Console_CommandLine-1.1.0.tgz ...
Starting to download Console_CommandLine-1.1.0.tgz (37,554 bytes)
..........done: 37,554 bytes

^ stops after download

Revision history for this message
Rajoy (siberia-accanto) wrote :

If this has been fixed in 5.2.11, why do we still have 5.2.10 in packages?

Having these issues in 5.2.10.dfsg.1-2ubuntu5, 32-bit Karmik.

Revision history for this message
Chuck Short (zulcss) wrote :

@Rajoy,

Because we are in the middle of a Feature Freeze in anticipation for release next week. I am currently working on this issue by backporting the fixes from 5.2.11

Thanks for your patience.

Regards
chuck

Revision history for this message
Chuck Short (zulcss) wrote :

While trying to fix this backporting the fixes to php's zlib is not solving this problem so this is leading me to believe its something else.

Regards
chuck

Revision history for this message
Chuck Short (zulcss) wrote :

Ok,

I think I have nailed this down, it looks like a patch was drooped that debian carried:

With the patch applied I get the following:

chuck@cartman:~/work/server/bugs/main/karmic/php/ppa$ !568
php -r "var_dump(function_exists("gzopen"));"
bool(true)

And for pear I get the following now:

huck@cartman:~/work/server/bugs/main/karmic/php/ppa$ sudo pear install Auth
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
WARNING: "pear/MDB" is deprecated in favor of "pear/MDB2"
Did not download optional dependencies: pear/Log, pear/File_Passwd, pear/Net_POP3, pear/DB, pear/MDB, pear/MDB2, pear/Auth_RADIUS, pear/Crypt_CHAP, pear/File_SMBPasswd, pear/HTTP_Client, pear/SOAP, pear/Net_Vpopmaild, pecl/vpopmail, pecl/kadm5, use --alldeps to download automatically
pear/Auth can optionally use package "pear/Log" (version >= 1.9.10)
pear/Auth can optionally use package "pear/File_Passwd" (version >= 1.1.0)
pear/Auth can optionally use package "pear/Net_POP3" (version >= 1.3.0)
pear/Auth can optionally use package "pear/DB" (version >= 1.6.0)
pear/Auth can optionally use package "pear/MDB"
pear/Auth can optionally use package "pear/MDB2" (version >= 2.0.0RC1)
pear/Auth can optionally use package "pear/Auth_RADIUS"
pear/Auth can optionally use package "pear/Crypt_CHAP" (version >= 1.0.0)
pear/Auth can optionally use package "pear/File_SMBPasswd" (version >= 1.0.0)
pear/Auth can optionally use package "pear/HTTP_Client" (version >= 1.1.0)
pear/Auth can optionally use package "pear/SOAP" (version >= 0.9.0)
pear/Auth can optionally use package "pear/Net_Vpopmaild" (version >= 0.1.0)
pear/Auth can optionally use package "pecl/vpopmail" (version >= 0.2)
pear/Auth can optionally use package "pecl/kadm5" (version >= 0.2.3)
pear/Auth can optionally use PHP extension "imap"
pear/Auth can optionally use PHP extension "saprfc"
downloading Auth-1.6.2.tgz ...
Starting to download Auth-1.6.2.tgz (56,036 bytes)
.............done: 56,036 bytes
install ok: channel://pear.php.net/Auth-1.6.2

Revision history for this message
Chuck Short (zulcss) wrote :

Please test the version my ppa when its built.

Thanks
chuck

Revision history for this message
Gabor Halaszvari (g-halaszvari) wrote :

It works for me.

$ apt-cache policy php-pear
php-pear:
  Telepítve: 5.2.10.dfsg.1-2ubuntu7~ppa5
  Jelölt: 5.2.10.dfsg.1-2ubuntu7~ppa5
  Verziótáblázat:
 *** 5.2.10.dfsg.1-2ubuntu7~ppa5 0
        500 http://ppa.launchpad.net karmic/main Packages
        100 /var/lib/dpkg/status
     5.2.10.dfsg.1-2ubuntu6 0
        500 http://archive.ubuntu.com karmic/main Packages

Revision history for this message
izi (izimobil) wrote :

Everything works as expected here too, great job Chuck, commit away ;)

Revision history for this message
Chuck Short (zulcss) wrote :

Thanks for the testing.

Regards
chuck

Changed in php5 (Ubuntu):
milestone: none → karmic-updates
Revision history for this message
Martin Pitt (pitti) wrote :

I rejected the two php5 uploads, it's too late for karmic final. Please reupload as an SRU. Thanks!

Chuck Short (zulcss)
summary: - PHP 5.2.10 zlib bug remains for 32bit
+ [SRU]PHP 5.2.10 zlib bug remains for 32bit
Revision history for this message
Chuck Short (zulcss) wrote : Re: [SRU]PHP 5.2.10 zlib bug remains for 32bit

Statement of Impact:

PHP in karmic was shipped without a patch that causes users on i386 systems unable to use the zlib library.

How this have been addressed:

I have re-enabled the 019-z_off_t_as_long.patch for php. This has to been added again when lucid starts again. I have attached the debdiff to this bug for your review.

How to reproduce:

1. Install php5-common, php5-cli
2. Run the following command:

<?php
var_dump(function_exists("gzopen"));
?>

3. It should return bool(true) but it doesnt.

There should not be any regressions with this patch enabled. If you have any questions please let me know.

Regards
chuck

Revision history for this message
Chuck Short (zulcss) wrote :
summary: - [SRU]PHP 5.2.10 zlib bug remains for 32bit
+ [SRU] PHP 5.2.10 zlib bug remains for 32bit
Revision history for this message
Chuck Short (zulcss) wrote :
Revision history for this message
Chuck Short (zulcss) wrote :

The work around for now is to do sudo pear install -Z <pear module>

Changed in ubuntu-release-notes:
assignee: nobody → Chuck Short (zulcss)
Changed in php5 (Ubuntu Karmic):
assignee: nobody → Chuck Short (zulcss)
Revision history for this message
Chuck Short (zulcss) wrote :

Release note:

When install pear modules on i386 architecture, the pear module will silently fail. The work around is to use the following:

sudo pear install -Z <pear module>

A fix for this issue is expected to be provided in a post-release update immediately after the Ubuntu 9.10 release.

Mathias Gug (mathiaz)
description: updated
Changed in ubuntu-release-notes:
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

I reviewed the package in -proposed, approved. Will accept right after karmic release.

Changed in php5 (Ubuntu Karmic):
status: Confirmed → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

Isn't this bug going to affect all uses of the zlib extension in PHP? Why do we want a release note that talks exclusively about pear?

Changed in ubuntu-release-notes:
status: Fix Committed → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

And how does the patch to fix the not-64-bit-clean functions account for gzopen() being missing, for that matter?

Martin Pitt (pitti)
Changed in php5 (Ubuntu):
milestone: karmic-updates → none
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted php5 into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Chuck says the patch is at least helping users to be able to use zlib again, so I accept this into -proposed for further testing.

Chuck, can you please answer Steve's questions before this moves to -updates? Thank you!

Revision history for this message
Chuck Short (zulcss) wrote :

Steve,

Yes this bug affects all of the users using the zlib extensions not just the pear users. Basically the 019-z_off_t_as_long.patch is needed to make sure that the LFS-enabled SAPIs can still use the zlib functions correctly.

chuck.

Revision history for this message
Hugues Fournier (hugues-fournier) wrote :

There are multiple positive test from users of the -proposed packages on bug #451405

Revision history for this message
suniyo (suniyo) wrote :

not going to affect pears only, but everyone with php.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Henri Bergius (bergie) wrote :

Added a bug report upstream to Archive_Tar about better error reporting needed, as now users affected by this bug do not receive any information about what is wrong. https://pear.php.net/bugs/bug.php?id=16759

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php5 - 5.2.10.dfsg.1-2ubuntu6.1

---------------
php5 (5.2.10.dfsg.1-2ubuntu6.1) karmic-proposed; urgency=low

  * debian/patches/series: Re-enable 019-z_off_t_as_long.patch. This is
    causing users to have issues with zlib (LP: #451314)

 -- Chuck Short <email address hidden> Wed, 28 Oct 2009 09:03:25 -0400

Changed in php5 (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied karmic-proposed to lucid.

Changed in php5 (Ubuntu):
status: Fix Committed → Fix Released
Changed in php5 (Ubuntu Karmic):
status: Fix Released → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

This bug is already being fixed in SRU, so I don't think we should add this to the release notes after the fact.

Changed in ubuntu-release-notes:
status: Incomplete → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php5 - 5.2.10.dfsg.1-2ubuntu6.1

---------------
php5 (5.2.10.dfsg.1-2ubuntu6.1) karmic-proposed; urgency=low

  * debian/patches/series: Re-enable 019-z_off_t_as_long.patch. This is
    causing users to have issues with zlib (LP: #451314)

 -- Chuck Short <email address hidden> Wed, 28 Oct 2009 09:03:25 -0400

Changed in php5 (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
lsga (ls-gacartigas) wrote :

hi. I'm using Magento (most used eCommerce framework in the world...)
Magento does not work with PHP 5.3 (as many CMS and frameworks).

So, as many people, I needed to downgrade to PHP 5.2.10 with the very popular trick :
http://dustyreagan.com/downgrade-php-5-3-to-5-2/comment-page-1/

But now, I have the gzopen bug.
I'm a webdevelopper, not a sysadmin. I use Ubuntu because it suppose to be 'easy to use'. I felt yet difficult and weird the downgrading of PHP.

Now, what I'm suppose to do for Ubuntu being able to run Magento ?
Could you please explain in a 'step by step way' how to fix the gzopen() bug ?

thanks.

Revision history for this message
Andrey Pohilko (undera) wrote :

This bug seems to be back in trusty x32.

get_extension_funcs ('Zlib') shows "gztell64, gzseek64, gzopen64".

php -i | grep ZLib:
  ZLib Version => 1.2.8

php5-common=5.5.9+dfsg-1ubuntu4
zlib1g:i386=1:1.2.8.dfsg-1ubuntu1

Revision history for this message
x33a (x33a) wrote :

I can confirm that this bug affects ubuntu 14.04 i386.

As a result, I have been unable to update Piwik, which gives me the following error:
    "Abort pclzip.lib.php : Missing zlib extensions"

It's almost a month since Andrey reported this bug to be back. Do the maintainers plan to fix this anytime soon?

Revision history for this message
Mike (blindpet) wrote :

This bug still remains 6 months later. I just wasted 2 days trying to figure out why this package I was using wasn't working. Please fix this for 32-bit users.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.