简体   繁体   中英

How to get executable phar command from the PHP source working?

I want to be able to work with phar command line tool (on Debian Linux) like described on this manpage .

What I've done so far:

  1. downloaded the PHP PHAR source folder ;

  2. moved it to /usr/share/ ;

  3. altered the first line of the phar.php from #!/usr/local/bin/php to #!/usr/bin/php (path to the PHP symlink -> to the PHP executable file);

  4. created a symlink phar to /usr/share/phar/phar.php .

Now phar help returns an error:

# phar help
PHP Fatal error:  Uncaught exception 'PharException' with message 'manifest cannot be larger than 100 MB in phar "/usr/share/phar/phar.php"' in /usr/share/phar/phar.php:48
Stack trace:
#0 /usr/share/phar/phar.php(48): Phar::mapPhar()
#1 {main}
  thrown in /usr/share/phar/phar.php on line 48

What am I doing wrong? How to get it working?

Thx

Probably a corrupted phar file. Try download it again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM