【发布时间】:2016-04-29 17:43:55
【问题描述】:
希望这里有人对此有所了解。
小问题
我在命令行上使用 phpdoc 时遇到了错误,该错误是通过 pear 在 PHP 7.0.2 上安装的。错误是:
#> 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,为什么我仍然会收到此错误?
谢谢!
【问题讨论】:
标签: php phpdoc php-7 opcache phpdocumentor2