|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-01-09 00:25 UTC] weirdan at gmail dot com
Description: ------------ There's a tar file that PharData fails to open: http://download.pear.php.net/package/Structures_Graph-1.1.1.tgz (either gzipped or ungzipped). It works with php 5.3 (vanilla), 5.6 (debian build), but fails starting with php 7.0.{0,1,2} (all vanilla versions from php.net) If I repack the archive (unpack and pack it back with tar cvf) it works fine. At first I thought the cause of the problem was that the archive did not include directories, but other similar archive (also without folder entries) http://download.pear.php.net/package/Console_CommandLine-1.2.1.tgz opens just fine. Test script: --------------- #!/bin/bash for ver in 5.3.29 system 7.0.0 7.0.1 7.0.2; do phpenv local $ver php -r 'echo phpversion() . "\n"; new \PharData("bad/Structures_Graph-1.1.1.tar");' done Expected result: ---------------- 5.3.29 5.6.16-4 7.0.0 7.0.1 7.0.2 Actual result: -------------- 5.3.29 5.6.16-4 7.0.0 PHP Fatal error: Uncaught UnexpectedValueException: phar error: tar-based phar "Structures_Graph-1.1.1/tests/BasicGraphTest.php" cannot be registered in Command line code:1 Stack trace: #0 Command line code(1): PharData->__construct('bad/Structures_...') #1 {main} thrown in Command line code on line 1 7.0.1 PHP Fatal error: Uncaught UnexpectedValueException: phar error: tar-based phar "Structures_Graph-1.1.1/tests/BasicGraphTest.php" cannot be registered in Command line code:1 Stack trace: #0 Command line code(1): PharData->__construct('bad/Structures_...') #1 {main} thrown in Command line code on line 1 7.0.2 PHP Fatal error: Uncaught UnexpectedValueException: phar error: tar-based phar "Structures_Graph-1.1.1/tests/BasicGraphTest.php" cannot be registered in Command line code:1 Stack trace: #0 Command line code(1): PharData->__construct('bad/Structures_...') #1 {main} thrown in Command line code on line 1 PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
Same problem with php 7.0.3 on Ubuntu. Composer isn't going anywhere because of this. uname: Linux scw-3c69c4 3.2.34-30 #17 SMP Mon Apr 13 15:53:45 UTC 2015 armv7l armv7l armv7l GNU/Linux PHP 7.0.3-4+deb.sury.org~trusty+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies