希望这里有人对此了解一些。
简短问题
我在使用通过pear安装在PHP 7.0.2上的phpdoc命令行时遇到了一个错误。错误信息如下:
#> phpdoc
PHP Fatal error: Uncaught Doctrine\Common\Annotations\AnnotationException:
You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.
in /usr/local/php5-7.0.2-20160108-102134/lib/php/phpDocumentor/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php:193
我该如何修复这个错误?
细节
Opcache已启用,并且opcache.load_comments=1
在我的opcache.ini文件中,使用命令php -i | grep "Opcode"
和php -i | grep "opcache"
进行验证。通过检查该.ini文件,我可以验证更改是否被加载,通过该文件启用和禁用opcache。
话虽如此,如果我在我的.ini文件中有opcache.load_comments=1
,为什么我仍然会收到此错误?
谢谢!