Bug #76128 [Com]: PHAR file detection is broken
| From: | maikuolan at gmail dot com | Date: | Sat, 16 Jun 2018 08:16:15 +0000 |
| Subject: | Bug #76128 [Com]: PHAR file detection is broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215751@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76128&edit=1
ID: 76128
Comment by: maikuolan at gmail dot com
Reported by: kelunik@php.net
Summary: PHAR file detection is broken
Status: Open
Type: Bug
Package: PHAR related
Operating System: Linux
PHP Version: 7.2.3
Block user comment: N
Private report: N
New Comment:
#76061 and #76128 might be related (not sure).
https://bugs.php.net/bug.php?id=76061
https://bugs.php.net/bug.php?id=76128
Previous Comments:
------------------------------------------------------------------------
[2018-03-21 13:44:19] kelunik@php.net
Description:
------------
Detecting the PHAR in a file path like
'phar:///home/kelunik/acme-client.phar/vendor/autoload.php' works, but it fails if
there's no '.phar' extension.
'phar:///home/kelunik/acme-client/vendor/autoload.php' therefore doesn't work if the
PHAR is renamed to 'acme-client'.
Finding the PHAR in such a path isn't possible with quite some I/O. Because of that, I propose
to use a non-valid character such as a NUL-byte to separate the PHAR path from the path inside the
PHAR.
I think Java uses ! or # or so as a separator.
Expected result:
----------------
File functions work regardless of the file name of the PHAR.
Actual result:
--------------
File functions are broken if the PHAR doesn't end with '.phar'.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76128&edit=1