Bug #71748 [NEW]: Opcache in CLI cannot be enabled
From: iquito at gmx dot net
Operating system:
PHP version: 7.0.4
Package: opcache
Bug Type: Bug
Bug description:Opcache in CLI cannot be enabled
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.
--
Edit bug report at https://bugs.php.net/bug.php?id=71748&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71748&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71748&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71748&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71748&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71748&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71748&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71748&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71748&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71748&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71748&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71748&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71748&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71748&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71748&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71748&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71748&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71748&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71748&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71748&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71748&r=mysqlcfg
Thread (3 messages)
- iquito at gmx dot net