|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-03-23 15:09 UTC] danack@php.net
Description: ------------ The function opcache_is_script_cached is meant to return true if a script is already cached and present in OPCache. This is failing when running in the fpm-cgi in 5.6.7. It works when: * called from the CLI sapi. * in the fpm-cgi sapi in 5.6.2 Test script: --------------- <?php var_dump(opcache_is_script_cached(__FILE__)); var_dump(opcache_is_script_cached(realpath(__FILE__))); //The current file should always be present, as it is compiled and cached before being run. Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(false) bool(false) PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
It's possible I'm doing something dumb, but I've tested this against freshly compiled versions of 5.6.2 and 5.6.7 and there does seem to be different behaviour. File /etc/php.ini ================= zend_extension=opcache.so opcache.validate_timestamps=off opcache.enable=1 memory_limit=127M test.php ========= <?php var_dump(opcache_is_script_cached(__FILE__)); Configure script ================ ./configure \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ --sysconfdir=/etc \ --localstatedir=/var \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d \ --disable-cgi \ --disable-rpath \ --enable-xmlreader \ --enable-xmlwriter \ --enable-apcu \ --enable-fpm \ --enable-intl \ --enable-json \ --enable-mbregex \ --enable-mbstring \ --enable-pcntl \ --enable-pdo \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-zip \ --with-bz2 \ --with-curl \ --with-freetype-dir=/usr/lib \ --with-gd \ --with-jpeg-dir=/usr/lib \ --without-mcrypt \ --with-png-dir=/usr/lib \ --enable-fd-setsize=8192 \ --with-pdo-mysql \ --with-yaml \ --with-zlib \ --without-mhash \ --with-mysql \ --with-mysqli=mysqlnd \ --with-openssl \ --with-pcre-regex \ --without-pear \ --enable-maintainer-zts I'm using the builtin webserver to test `php -S 127.0.0.1:80` and then `wget -O php5.6.2.test 127.0.0.1/test.php` and the same command with a different output filename for 5.6.7 I'm still seeing that the file is cached according to 5.6.2 and isn't according to 5.6.7