|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-05-01 18:19 UTC] ab@php.net
-Status: Open
+Status: Feedback
[2016-05-01 18:19 UTC] ab@php.net
[2016-05-15 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 07:00:01 2025 UTC |
Description: ------------ 开启`opcache`缓存,但是`opcache_compile_file`无法编译生成缓存文件,提示`Notice: Zend OPcache seems to be disabled, can't compile file in C:\Users\Administrator\Desktop\opcode\script\web\compile.php on line 4` 配置: Array ( [directives] => Array ( [opcache.enable] => 1 [opcache.enable_cli] => 1 [opcache.use_cwd] => 1 [opcache.validate_timestamps] => [opcache.inherited_hack] => 1 [opcache.dups_fix] => [opcache.revalidate_path] => [opcache.log_verbosity_level] => 1 [opcache.memory_consumption] => 67108864 [opcache.interned_strings_buffer] => 4 [opcache.max_accelerated_files] => 2000 [opcache.max_wasted_percentage] => 0.05 [opcache.consistency_checks] => 0 [opcache.force_restart_timeout] => 180 [opcache.revalidate_freq] => 1 [opcache.preferred_memory_model] => [opcache.blacklist_filename] => [opcache.max_file_size] => 0 [opcache.error_log] => C:/Users/Administrator/Desktop/opcode/php/runtime/log/opcache_error.log [opcache.protect_memory] => [opcache.save_comments] => 1 [opcache.fast_shutdown] => [opcache.enable_file_override] => [opcache.optimization_level] => 2147467263 [opcache.file_cache] => C:/Users/Administrator/Desktop/opcode/php/runtime/opcache_file_cache [opcache.file_cache_only] => 1 [opcache.file_cache_consistency_checks] => ) [version] => Array ( [version] => 7.0.6-dev [opcache_product_name] => Zend OPcache ) [blacklist] => Array ( ) ) Test script: --------------- ```php (function () { opcache_compile_file(__DIR__ . '/test.php'); // `test.php`文件内容随便 // print_r(opcache_get_status()); // phpinfo(); // var_dump(ini_get('opcache.enable')); })(); ```