PHP7添加opcache.so模块报错

启动php报错如下:

# /usr/local/php7/sbin/php-fpm
[09-Apr-2019 16:21:13] NOTICE: PHP message: PHP Warning:  PHP Startup: Invalid library (appears to be a Zend Extension, try loading using 
zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/opcache.so from php.ini) in Unknown on line 0

书写方法:

zend_extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/opcache.so"

重新启动并查看模块:

# php -m
[PHP Modules]
……

[Zend Modules]
Zend OPcache

 

上一篇:PHP7内核-变量的内部实现


下一篇:phpstudy_php7_nginx环境配置