You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using strace I noticed stat system calls for the files already in opcache, even though opcache.enable_file_override is set to 1. The system calls are triggered by is_file() being invoked from PHP.
php_admin_flag[opcache.enable_file_override] = On is set in the pool config /etc/php/8.1/fpm/pool.d/www.conf
var_dump(opcache_get_configuration()) when being invoked through an fpm process says:
["opcache.enable_file_override"]=>
| bool(true)
phpinfo() says the same, enable_file_override is On.
I suspect the actual value of the flag is Off.
How to reproduce the issue.
Ensure that opcache is enabled and enable_file_override is disabled (disabled by default). Also, set in the ini file:
The opcache.enable_file_override flag works only when it's set in the ini file.
The worst thing is that setting the flag in the pool config gives a false positive result in opcache_get_configuration() and phpinfo(), which might be very misleading.
PHP Version
PHP 8.1.13
Operating System
Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
This is related to #8699 and should get fixed once the solution for that is implement - it will at least properly fails for system inis that cannot be supported.
Description
Quick explanation of the problem.
When using
strace
I noticedstat
system calls for the files already in opcache, even thoughopcache.enable_file_override
is set to 1. The system calls are triggered by is_file() being invoked from PHP.php_admin_flag[opcache.enable_file_override] = On is set in the pool config
/etc/php/8.1/fpm/pool.d/www.conf
var_dump(opcache_get_configuration())
when being invoked through an fpm process says:phpinfo() says the same, enable_file_override is On.
I suspect the actual value of the flag is Off.
How to reproduce the issue.
test_opcache.php
plus two more scripts in the same directory:
include_1.php
include_2.php
strace -p <pid> -e newfstatat,fstat,stat
.php_admin_flag[opcache.enable_file_override] = On
in the pool config and restart apache and fpm.Conclusion
The
opcache.enable_file_override
flag works only when it's set in the ini file.The worst thing is that setting the flag in the pool config gives a false positive result in opcache_get_configuration() and phpinfo(), which might be very misleading.
PHP Version
PHP 8.1.13
Operating System
Ubuntu 18.04
The text was updated successfully, but these errors were encountered: