From: Operating system: Arch Linux x86_64 PHP version: 5.3.5 Package: PHAR related Bug Type: Bug Bug description:PHAR reports invalid error message, when the directory does not exist
Description: ------------ When we try to create a PHAR archive, and the directory, where we want to save it does not exist, PHAR complains about invalid file extension, instead of informing that there is a problem with accessing the requested location. This is a bit confusing. Test script: --------------- <?php // assume that "./dummy/" does not exist. $phar = new Phar('./dummy/archive.phar'); Expected result: ---------------- Cannot create phar './dummy/archive.phar', invalid path in pharbuild.php on line 2 (or something like that) Actual result: -------------- UnexpectedValueException: Cannot create phar './dummy/archive.phar', file extension (or combination) not recognised in pharbuild.php on line 2 -- Edit bug report at http://bugs.php.net/bug.php?id=53898&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53898&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53898&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53898&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53898&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53898&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53898&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53898&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53898&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53898&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53898&r=support Expected behavior: http://bugs.php.net/fix.php?id=53898&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53898&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53898&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53898&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53898&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53898&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53898&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53898&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53898&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53898&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53898&r=mysqlcfg