note 104761 rejected from phar.mount by danbrown
| From: | danbrown@php.net | Date: | Wed, 06 Jul 2011 13:17:06 +0000 |
| Subject: | note 104761 rejected from phar.mount by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-181280@lists.php.net to get a copy of this message | ||
Note Submitter: spaff at pro-unreal dot de
----
The documentation is missing some important points reportet here:
https://bugs.php.net/bug.php?id=55143
Unlike unix mount it is not possible to mount an external location to an existing path inside the
phar. $pharpath must not exist or mount will fail.
When calling from inside a phar it not only may be a relative path, it MUST be a relative path or
mount will fail. Mounting to foreign pahr locations inside a phar is not possible.
To the previous comment:
Please note that database.db will become readonly in your case when phar.readonly is set to 1 in
php.ini
Mounting directories works (already got it working with magento):
<?php
// In stub
Phar::mount('phar://' . __FILE__ . '/site', __DIR__ . '/site');
?>
Please note as stated above, the "site" directory must NOT exist in your phar or it will
fail.