【问题标题】:How to get executable phar command from the PHP source working?如何从 PHP 源代码中获取可执行的 phar 命令?
【发布时间】:2013-03-13 09:26:47
【问题描述】:

我希望能够使用phar 命令行工具(在 Debian Linux 上),如this manpage 中所述。

到目前为止我做了什么:

  1. 下载了PHP PHAR source folder

  2. 将其移至/usr/share/

  3. phar.php 的第一行从#!/usr/local/bin/php 更改为#!/usr/bin/php(PHP 符号链接的路径-> PHP 可执行文件的路径);

  4. 创建了一个符号链接 phar/usr/share/phar/phar.php

现在phar help 返回错误:

# 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

我做错了什么?如何让它工作?

谢谢

【问题讨论】:

标签: php command-line phar


【解决方案1】:

可能是损坏的 phar 文件。尝试重新下载。

【讨论】:

    猜你喜欢
    • 2012-03-20
    • 1970-01-01
    • 2018-06-14
    • 2013-09-25
    • 2011-02-09
    • 1970-01-01
    • 1970-01-01
    • 2019-08-04
    • 1970-01-01
    相关资源
    最近更新 更多