Bug #71296 [NEW]: Opcache Fatal error when enabling opcache.file_cache_only

From: Date: Wed, 06 Jan 2016 23:04:46 +0000
Subject: Bug #71296 [NEW]: Opcache Fatal error when enabling opcache.file_cache_only
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198461@lists.php.net to get a copy of this message
From:             cyberdevil001 at telenet dot be
Operating system: CentOS
PHP version:      7.0.1
Package:          opcache
Bug Type:         Bug
Bug description:Opcache Fatal error when enabling opcache.file_cache_only

Description:
------------
Configure Command =>  './configure'  '--prefix=/usr/local/php70'
'--program-suffix=70'
'--with-config-file-scan-dir=/usr/local/php70/lib/php.conf.d'
'--with-curl=/usr/local/lib' '--with-gd' '--enable-gd-native-ttf'
'--with-gettext' '--with-jpeg-dir=/usr/local/lib'
'--with-freetype-dir=/usr/local/lib' '--with-libxml-dir=/usr/local/lib'
'--with-kerberos' '--with-openssl' '--with-mcrypt'
'--with-mhash'
'--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=mysqlnd'
'--with-pcre-regex=/usr/local' '--with-pdo-mysql=mysqlnd'
'--with-pear'
'--with-png-dir=/usr/local/lib' '--with-xsl' '--with-zlib'
'--with-zlib-dir=/usr/local/lib' '--enable-zip'
'--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar'
'--enable-ftp' '--enable-sockets' '--enable-soap'
'--enable-mbstring'
'--with-icu-dir=/usr/local/icu' '--enable-opcache'
'--enable-opcache-file' '--enable-opcache-filecache' '--enable-intl'

PHP.INI settings:
opcache.memory_consumption=32
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=3000
opcache.revalidate_freq=60
opcache.fast_shutdown=0
opcache.enable_cli=1
opcache.file_cache_only=1
opcache.file_cache=/tmp/.opcache/

Test script:
---------------
/usr/local/bin/php --version
PHP 7.0.1 (cli) (built: Jan  5 2016 23:49:38) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend
Technologies


Opcache PHP info via CLI:

Zend OPcache

Opcode Caching => Disabled
Optimization => Disabled
SHM Cache => Disabled
File Cache => Enabled
Startup => OK

Directive => Local Value => Master Value
opcache.blacklist_filename => no value => no value
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => On => On
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.fast_shutdown => 0 => 0
opcache.file_cache => /tmp/.opcache/ => /tmp/.opcache/
opcache.file_cache_consistency_checks => 1 => 1
opcache.file_cache_only => 1 => 1
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.huge_code_pages => Off => Off
opcache.inherited_hack => On => On
opcache.interned_strings_buffer => 8 => 8
opcache.log_verbosity_level => 1 => 1
opcache.max_accelerated_files => 3000 => 3000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 32 => 32
opcache.optimization_level => 0xFFFFFFFF => 0xFFFFFFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 60 => 60
opcache.revalidate_path => Off => Off
opcache.save_comments => 1 => 1
opcache.use_cwd => On => On
opcache.validate_timestamps => On => On



Expected result:
----------------
Opcache.file_cache_only should write files inside /tmp/.opcache and not
show the error below because opcache.file_cache is actually set correct
according to php-cli output. Error in logs is shown while running any
script (for example: <?php phpinfo(); ?>)

Actual result:
--------------
tail -n 2 /var/log/httpd/error_log
Wed Jan  6 16:53:01 2016 (846663): Fatal Error opcache.file_cache_only
is set without a proper setting of opcache.file_cache
Wed Jan  6 16:53:03 2016 (846686): Fatal Error opcache.file_cache_only
is set without a proper setting of opcache.file_cache

-- 
Edit bug report at https://bugs.php.net/bug.php?id=71296&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71296&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71296&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71296&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71296&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71296&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71296&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71296&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71296&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71296&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71296&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71296&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71296&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71296&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71296&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71296&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71296&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71296&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71296&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71296&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71296&r=mysqlcfg



Thread (10 messages)

« previous php.bugs (#198461) next »