|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-03-09 00:38 UTC] iquito at gmx dot net
[2016-03-09 00:51 UTC] iquito at gmx dot net
-Status: Open
+Status: Closed
[2016-03-09 00:51 UTC] iquito at gmx dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
Description: ------------ With PHP7, it makes sense to enable opcache for CLI together with the opcache.file_cache options. I tried the following options: opcache.enable=1 opcache.enable_cli=1 opcache.file_cache="/srv/php-file-cache" opcache.file_cache_only=0 opcache.file_cache_consistency_checks=1 I found out that even though cron jobs worked fine, no files were cached. php CLI seems to completely ignore any opcache settings, and "phpinfo();" from command line also contains no opcache section. FPM correctly recognizes opcache settings and also displays them with phpinfo. Test script: --------------- Run php -d opcache.enable=1 inittest.php inittest.php: <?php echo ini_get('opcache.enable'); ---- Another way to easily test it, is to run "<?php phpinfo();" from command line - no opcache section is contained in the output, no matter the php.ini settings.