質問

I am trying to learn how to create phars and i am getting this error and have no clue how to fix it. Any ideas?

Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '/myapp/build/myapp.phar', file extension (or combination) not recognised or the directory does not exist' in /Volumes/www/vhosts/myapp/create-phar.php:11
Stack trace:
#0 /Volumes/www/vhosts/myapp/create-phar.php(11): Phar->__construct('/myapp/build/my...', 256, 'myapp.phar')
#1 {main}
  thrown in /Volumes/www/vhosts/myapp/create-phar.php on line 11

I am following the code form this page: packaging your app with phar

役に立ちましたか?

解決

Use the full path for windows like

$srcRoot = getcwd() . '/src';
$buildRoot = getcwd() . '/build';

他のヒント

I've been following the same article and the problem are the paths or how they are defined in the first couple of lines, here is what I did:

    $srcRoot = "src/";
    $buildRoot = "build/";

This solution is for Ubuntu 12.04.3 LTS

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top