PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PHP » PHP_Archive » Bug #8084

error: failed to open stream

Details

Submitted2006-06-30 05:03 UTC
Fromhickwu at gmail dot com
StatusBogus
PackagePHP_Archive
PHP Version5.1.4
OSwindows xp pro sp1
Roadmaps(Not assigned)

Comments

[2006-06-30 05:03 UTC] hickwu at gmail dot com

Description:
------------
I load the php_phar.dll in php.ini, and I can see "Registered PHP Streams php, file, http, ftp, compress.zlib, phar" in the output of phpinfo().

Test script:
---------------
include "phar://test_phar.phar/test.php";

Expected result:
----------------
it should output nothing :)

Actual result:
--------------
when I copy some example from the Unit Test code by Greg, it reported the following error:

Warning: require(phar://test_phar.phar/test_root.php)
[function.require]: failed to open stream: phar error: "test_root.php"
is not a file in phar "test_phar.phar" in D:\Web\index.php on line 2

Fatal error: require() [function.require]: Failed opening required
'phar://test_phar.phar/test_root.php'
(include_path='.;D:\program\php5\pear') in D:\Web\index.php on line 2

I am sure of that there is a file name "test_root.php" in the phar file "test_phar.phar".

the thing went worse if I did not load php_phar.dll in the file php.ini :

Warning: require(phar://test_phar.phar/test_root.php)
[function.require]: failed to open stream: Invalid argument in
D:\Web\index.php on line 2

Fatal error: require() [function.require]: Failed opening required
'phar://test_phar.phar/test_root.php'
(include_path='.;D:\program\php5\pear') in D:\Web\index.php on line 2

[2006-12-04 01:05 UTC] hickwu at gmail dot com

It should be ok now.