php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51889 go-pear will fail, miserably
Submitted: 2010-05-22 22:38 UTC Modified: 2010-06-20 19:24 UTC
From: dmda at yandex dot ru Assigned: pajoye (profile)
Status: Closed Package: PHAR related
PHP Version: 5.3.2 OS: Win32
Private report: No CVE-ID: None
 [2010-05-22 22:38 UTC] dmda at yandex dot ru
Description:
------------
go-pear.bat throws warnings and errors.

C:\php5>go-pear.bat
phar "C:\php5\PEAR\go-pear.phar" does not have a signature
Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
r error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C:\
php5\PEAR\go-pear.phar on line 1236
Press any key to continue . . .



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-23 22:18 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2010-05-23 22:18 UTC] kalle@php.net
Try open go-pear.bat and find this line:
%PHP_BIN% -d output_buffering=0 PEAR\go-pear.phar

and change it do:
%PHP_BIN% -d output_buffering=0 -d phar.require_hash=0 PEAR\go-pear.phar
 [2010-05-24 09:13 UTC] dmda at yandex dot ru
-Status: Feedback +Status: Open
 [2010-05-24 09:13 UTC] dmda at yandex dot ru
I noticed exactly the same bug report submitted in the past for 5.3.0 and it was closed saying the CVS version was fixed. It appears now that the problem was either not fixed or some further fixes recreated the problem again...

Yep, with this extra option go-pear runs without the error.
But what does corrupt the phar hash so disabling it fixes the problem?
Is there a design problem? Is there a way for the phar to detect consistency problems so it could rebuild the hash automatically? Is there a way for the official builds to distribute PEAR's phar in a consistent way? Is there a way to have related tests in phpt form?
 [2010-05-29 08:11 UTC] kalle@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pajoye
 [2010-05-29 08:11 UTC] kalle@php.net
The issue here is that the go-pear.phar file doesn't have a signature, by default Phar will require a signature to execute the phar file, the phar.require_hash=0 disables this requirement which makes it work.

Assigning this to Pierre, since I don't have a snapshot template, nor did I see it anywhere in SVN to fix this.
 [2010-06-20 19:24 UTC] kalle@php.net
-Status: Assigned +Status: Closed
 [2010-06-20 19:24 UTC] kalle@php.net
Closed, please report it to pear and reference this bug. Its their phar thats built without a signature that makes go-pear fail, where it shouldn't
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 08:01:29 2024 UTC