Debian Bug report logs -
#425377
php5-cli: stream_wrapper_restore() does not work
Reported by: Sébastien Ducoulombier <seb@ldd.fr>
Date: Mon, 21 May 2007 10:21:02 UTC
Severity: normal
Found in version 5.2.0-8+etch4
Fixed in version 5.2.6.dfsg.1-1+lenny4
Done: Ondřej Surý <ondrej@sury.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#425377; Package php5-cli.
(full text, mbox, link).
Acknowledgement sent to Sébastien Ducoulombier <seb@ldd.fr>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: php5-cli
Version: 5.2.0-8+etch4
Severity: normal
PHP5 standard method stream_wrapper_restore() always breaks.
stream_wrapper_unregister('zip');
stream_wrapper_restore('zip'); # triggers "Warning: stream_wrapper_restore(): zip:// never existed, nothing to restore"
libapache2-mod-php5 suffers the same bug.
Here is a more detailled test program :
#!/usr/bin/php
<?php
error_log("Original list of stream wrappers:");
error_log(print_r(stream_get_wrappers(), true));
$wrappers = stream_get_wrappers();
$w = $wrappers[0];
error_log("Unregistering the first one, '$w'...");
stream_wrapper_unregister($w);
error_log("Now '$w' was removed from the list of stream wrappers (fine):");
error_log(print_r(stream_get_wrappers(), true));
error_log("Restoring '$w' (won't work, this is the bug)...");
stream_wrapper_restore($w);
error_log("'$w' was not restored into the list of stream wrappers (wrong):");
error_log(print_r(stream_get_wrappers(), true));
?>
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.21.1fly (PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#425377; Package php5-cli.
(full text, mbox, link).
Acknowledgement sent to sean finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #10 received at 425377@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
hi stefan,
On Mon, 2007-05-21 at 12:19 +0200, Sébastien Ducoulombier wrote:
> Package: php5-cli
> Version: 5.2.0-8+etch4
> Severity: normal
>
> PHP5 standard method stream_wrapper_restore() always breaks.
thanks for the reproducing code, when i have time i'll see if this is
still a problem in unstable. fyi i don't think i will have time to find
the fix for this, but if you can dig up the relevant fix from
cvs.php.net we can see if it's worthy of being included in a future
point-release of stable.
sean
[signature.asc (application/pgp-signature, inline)]
Reply sent
to Ondřej Surý <ondrej@sury.org>:
You have taken responsibility.
(Fri, 08 Jan 2010 15:54:04 GMT) (full text, mbox, link).
Notification sent
to Sébastien Ducoulombier <seb@ldd.fr>:
Bug acknowledged by developer.
(Fri, 08 Jan 2010 15:54:04 GMT) (full text, mbox, link).
Message #15 received at 425377-done@bugs.debian.org (full text, mbox, reply):
Version: 5.2.6.dfsg.1-1+lenny4
Lenny version works just fine:
# php test.php
Original list of stream wrappers:
Array
(
[0] => zip
[1] => php
[2] => file
[3] => data
[4] => http
[5] => ftp
[6] => compress.bzip2
[7] => compress.zlib
[8] => https
[9] => ftps
)
Unregistering the first one, 'zip'...
Now 'zip' was removed from the list of stream wrappers (fine):
Array
(
[0] => php
[1] => file
[2] => data
[3] => http
[4] => ftp
[5] => compress.bzip2
[6] => compress.zlib
[7] => https
[8] => ftps
)
Restoring 'zip' (won't work, this is the bug)...
'zip' was not restored into the list of stream wrappers (wrong):
Array
(
[0] => php
[1] => file
[2] => data
[3] => http
[4] => ftp
[5] => compress.bzip2
[6] => compress.zlib
[7] => https
[8] => ftps
[9] => zip
)
Thanks for test case.
--
Ondřej Surý <ondrej@sury.org>
http://blog.rfc1925.org/
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sat, 06 Feb 2010 07:35:01 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jul 2 03:08:06 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.