升级到 10.9 Mavericks 后,尝试运行 php 脚本时出现以下错误。
我正在使用 Zend Server 并禁用了默认的 httpd 和 php。升级前一切正常。
例子:
php单元:
/usr/local/bin/phpunit: line 2: ?php: No such file or directory
/usr/local/bin/phpunit: line 3: /Applications: is a directory
/usr/local/bin/phpunit: line 4: LICENSE.html: command not found
/usr/local/bin/phpunit: line 5: syntax error near unexpected token `('
/usr/local/bin/phpunit: line 5: ` * Copyright (c) 2001-2013, Sebastian Bergmann <sebastian@phpunit.de>.'
phpcs
/usr/local/zend/bin/phpcs: line 2: ?php: No such file or directory
/usr/local/zend/bin/phpcs: line 3: /Applications: is a directory
/usr/local/zend/bin/phpcs: line 4: LICENSE.html: command not found
/usr/local/zend/bin/phpcs: line 5: LICENSE.html: command not found
/usr/local/zend/bin/phpcs: line 6: LICENSE.html: command not found
/usr/local/zend/bin/phpcs: line 7: LICENSE.html: command not found
/usr/local/zend/bin/phpcs: line 8: LICENSE.html: command not found
/usr/local/zend/bin/phpcs: line 9: LICENSE.html: command not found
/usr/local/zend/bin/phpcs: line 10: LICENSE.html: command not found
/usr/local/zend/bin/phpcs: line 11: syntax error near unexpected token newline
/usr/local/zend/bin/phpcs: line 11: ` * @author Greg Sherwood <gsherwood@squiz.net>'
如果我运行 /usr/local/zend/bin/php /usr/local/bin/phpunit 或 /usr/local/zend/bin/php /usr/local/bin/phpcs 它可以工作
其他详情:
$PATH -bash:/opt/local/bin:/opt/local/sbin:/usr/local/zend/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin :/opt/X11/bin:/usr/local/zend/bin: 没有这样的文件或目录