Bug #51806 [Opn->Nab]: chdir wont'work on phar files
| From: | mike@php.net | Date: | Mon, 30 Mar 2015 18:56:42 +0000 |
| Subject: | Bug #51806 [Opn->Nab]: chdir wont'work on phar files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191737@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=51806&edit=1
ID: 51806
Updated by: mike@php.net
Reported by: goetas at lignano dot it
Summary: chdir wont'work on phar files
-Status: Open
+Status: Not a bug
Type: Bug
Package: PHAR related
Operating System: Slackware
PHP Version: 5.3.2
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
phar:// streams are virtual, yet they give you the feeling of something real.
Would you expect chdir("http://example.com/foo") to succeed?
Previous Comments:
------------------------------------------------------------------------
[2011-11-15 16:01:29] felipe@php.net
Probably related to #52769
------------------------------------------------------------------------
[2010-05-13 10:19:20] goetas at lignano dot it
Description:
------------
cant change current working directory into phar package file
Test script:
---------------
<?php
$p = new Phar('test.tar.phar');
$p['index.php'] = '<?php var_dump(__DIR__); echo "\\n";
var_dump(chdir(__DIR__)); ?>';
include 'phar://test.tar.phar/index.php';
Expected result:
----------------
string(50) "phar:///mnt/md1/www/htdocs/test/phar/test.tar.phar"
bool(true)
Actual result:
--------------
string(50) "phar:///mnt/md1/www/htdocs/test/phar/test.tar.phar"
<br />
<b>Warning</b>: chdir() [<a
href='function.chdir'>function.chdir</a>]: No such file or directory (errno 2) in
<b>phar:///mnt/md1/www/htdocs/test/phar/test.tar.phar/indxed.php</b> on line
<b>1</b><br />
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=51806&edit=1