]> granicus.if.org Git - php/commitdiff
Fixed info while setting opcache.file_cache_only
authorXinchen Hui <laruence@gmail.com>
Tue, 29 Dec 2015 07:49:10 +0000 (15:49 +0800)
committerXinchen Hui <laruence@gmail.com>
Tue, 29 Dec 2015 07:49:10 +0000 (15:49 +0800)
ext/opcache/zend_accelerator_module.c

index f65e2700009f5497472009611e9001171b7bd984..4c86f41412129de4c774ac7e58cde772924a396a 100644 (file)
@@ -429,12 +429,18 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
 {
        php_info_print_table_start();
 
-       if (ZCG(enabled) && accel_startup_ok && (ZCG(counted) || ZCSG(accelerator_enabled))) {
+       if (ZCG(enabled) && accel_startup_ok &&
+#ifdef HAVE_OPCACHE_FILE_CACHE
+               ((ZCG(counted) || ZCSG(accelerator_enabled)) || ZCG(accel_directives).file_cache_only)
+#else
+               (ZCG(counted) || ZCSG(accelerator_enabled))
+#endif
+       ) {
                php_info_print_table_row(2, "Opcode Caching", "Up and Running");
        } else {
                php_info_print_table_row(2, "Opcode Caching", "Disabled");
        }
-       if (ZCG(enabled) && accel_startup_ok && ZCSG(accelerator_enabled) && ZCG(accel_directives).optimization_level) {
+       if (ZCG(enabled) && accel_startup_ok && ZCG(accel_directives).optimization_level) {
                php_info_print_table_row(2, "Optimization", "Enabled");
        } else {
                php_info_print_table_row(2, "Optimization", "Disabled");