我尝试在我的新机器上运行 PHPUnit 测试,但出现此错误:
PHP 致命错误:未捕获的异常 'UnexpectedValueException' 带有消息 'RecursiveDirectoryIterator::__construct(/usr/lib/php/pear/File/Iterator):无法打开目录:/usr/lib/php/pear 中打开的文件太多/文件/迭代器/Factory.php:114
旧机器上的相同代码运行良好......
新机环境:PHP 版本:PHP 5.3.21 (cli) 旧机:PHP 5.3.14
PHPUnit 每次输出:
................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 65 / 66 ( 98%)
E
Time: 34 seconds, Memory: 438.50Mb
There were 50 errors:
1) XXXXXXXXXXX
PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/usr/lib/php/pear/File/Iterator): failed to open dir: Too many open files' in /usr/lib/php/pear/File/Iterator/Factory.php:114