php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72111 `opcache_compile_file`无法编译
Submitted: 2016-04-27 05:57 UTC Modified: 2016-05-15 04:22 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: ljjgit at qq dot com Assigned:
Status: No Feedback Package: opcache
PHP Version: 7.0.5 OS: windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ljjgit at qq dot com
New email:
PHP Version: OS:

 

 [2016-04-27 05:57 UTC] ljjgit at qq dot com
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'));
})();
```


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-01 18:19 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2016-05-01 18:19 UTC] ab@php.net
Thanks for the report. I currently don't reproduce any notice when using your snippet and ini. Seems need more info to reproduce.

Thanks.
 [2016-05-15 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Apr 03 21:01:23 2020 UTC