Bug #53801 [NEW]: Cannot Access mount()'ed Items From Web
| From: | panman at traileyes dot com | Date: | Fri, 21 Jan 2011 04:24:08 +0000 |
| Subject: | Bug #53801 [NEW]: Cannot Access mount()'ed Items From Web | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-158038@lists.php.net to get a copy of this message | ||
From:
Operating system:
PHP version: 5.3.5
Package: PHAR related
Bug Type: Bug
Bug description:Cannot Access mount()'ed Items From Web
Description:
------------
Using the mount() method brings in files/folders so that PHP scripts can
use them internally. However, those files are not accessible through the
Web server as the built-in files are. The directory structure should be as
follows for the test below:
make.php = The test script below
internal.html = <p>From the inside</p>
external.html = <p>From the outside</p>
include.php = <?php include 'external.html'; ?>
test.phar = Will be built from the test script
Test script:
---------------
<?php
try {
$p = new Phar('test.phar');
$p->addFile('internal.html');
$p->addFile('include.php');
$p->setStub('<?php
Phar::webPhar("test.phar", "internal.html");
Phar::mount(__DIR__ . "/external.html", "external.html");
__HALT_COMPILER();');
echo 'Done making test.phar';
} catch (Exception $e) {
echo 'Exception caught: ' . $e->getMessage();
}
?>
Expected result:
----------------
Visiting: make.php
Done making test.phar
Visiting: test.phar/internal.html
From the inside
Visiting: test.phar/external.html
From the outside
Visiting: test.phar/include.php
From the outside
Actual result:
--------------
Visiting: make.php
Done making test.phar
Visiting: test.phar/internal.html
From the inside
Visiting: test.phar/external.html
404 - File /external.html Not Found
Visiting: test.phar/include.php
From the outside
--
Edit bug report at http://bugs.php.net/bug.php?id=53801&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53801&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53801&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53801&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53801&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53801&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53801&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53801&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53801&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53801&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53801&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53801&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53801&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53801&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53801&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53801&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53801&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53801&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53801&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53801&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53801&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53801&r=mysqlcfg