FS#64286 - [php] OPcache optimization is disabled

Attached to Project: Arch Linux
Opened by Dimos Dimoulis (dimosd) - Sunday, 27 October 2019, 16:32 GMT
Last edited by Pierre Schmitz (Pierre) - Sunday, 01 December 2019, 12:40 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I am using php-fpm with nginx. I have enabled OPcache in /etc/php/php.ini with these settings:

zend_extension=opcache
opcache.enable=1
opcache.optimization_level=0x7FFFBFFF

phpinfo() says that OPcache is "up and running" but optimization is "disabled". Furthermore the local value of opcache.optimization_level is reported as 0.
   php.ini (69.9 KiB)
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Sunday, 01 December 2019, 12:40 GMT
Reason for closing:  Not a bug
Comment by Alex V (avcalc) - Sunday, 27 October 2019, 21:29 GMT
I'm running into the same issue, i.e. "phpinfo() says that OPcache is "up and running" but optimization is "disabled". Furthermore the local value of opcache.optimization_level is reported as 0."

Here's my environment:

CentOS Linux release 8.0.1905 (Core)
Apache/2.4.37 (centos)

PHP 7.3.11 (cli) (built: Oct 22 2019 08:11:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.11, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans
Comment by Alex V (avcalc) - Monday, 28 October 2019, 03:01 GMT
The problem goes away, when I disable xdebug, i.e. comment out ";zend_extension=xdebug.so".
However, xdebug extension "was" loaded after opcache.
Comment by Dimos Dimoulis (dimosd) - Monday, 28 October 2019, 09:07 GMT
Same here. Disabling xdebug enables optimization but xdebug is loaded after php.ini, in /etc/php/conf.d/xdebug.ini
Comment by Pierre Schmitz (Pierre) - Sunday, 01 December 2019, 12:40 GMT
If at all this is an upstream bug. But I would say once you enable xdebug you should not care about optimizations and performance.

Loading...