我最近通过pear安装程序在我的服务器上安装了PHPUnit。
当我尝试运行一个测试时,出现以下错误:
PHP警告:require_once(PHPUnit/Util/Filter.php):无法打开流:在/usr/bin/phpunit的第44行中没有这样的文件或目录
PHP致命错误:require_once():在/usr/bin/phpunit的第44行中打开所需的“PHPUnit/Util/Filter.php”失败(include_path='.:/usr/bin/php')
经过一些搜索后,我尝试对服务器上的php.ini文件中的include_path进行一些修改。但这并没有起到任何作用。
您有什么想法可能会导致这种情况?
/etc/php5/apache2/php.ini
和/etc/php5/cli/php.ini
,并且必须使其包括父目录和子目录:include_path = ".:/usr/share/php:/usr/share/php/PEAR"
。 - hobssudo pear channel-discover pear.symfony.com
,然后才能成功执行sudo pear install --alldeps phpunit/PHPUnit
。 - skierpage