• Resolved Juuso Turunen

    (@juusoturunen)


    Hi!

    First, thank you for this great plugin!

    There is some PHP warnings when visiting “Cached files” tab (/wp-admin/admin.php?page=flush-opcache&tab=cached_files):

    2024/06/30 14:57:51 [error] 435052#435052: *105144 FastCGI sent in stderr: "/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key "timestamp" in /var/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key "timestamp" in /var/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key "timestamp" in /var/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key "timestamp" in /var/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key "timestamp" in /var/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key "timestamp" in /var/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key "timestamp" in /var/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key "timestamp" in /var/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key "timestamp" in /var/www/EXAMPLE.COM/public_html/wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 116; PHP message: PHP Warning:  Undefined array key

    As you can see there is a lot of same warning in a one “line”. I get several lines these when I refresh page once.

    Kindly,
    Juuso

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author nierdz

    (@mnttech)

    Hi, I suspect it’s some PHP tuning.

    Are you using a shared host or your own server ?

    What version of PHP are you running and what’s the configuration of OPcache ?

    Thread Starter Juuso Turunen

    (@juusoturunen)

    Hi!

    This is my own server.

    This happens on PHP 8.0 and 8.3.

    Directives	
    opcache.blacklist_filename not defined
    opcache.dups_fix false
    opcache.enable true
    opcache.enable_cli false
    opcache.enable_file_override false
    opcache.error_log not defined
    opcache.file_cache not defined
    opcache.file_cache_consistency_checks true
    opcache.file_cache_only false
    opcache.file_update_protection 2
    opcache.force_restart_timeout 180
    opcache.huge_code_pages false
    opcache.interned_strings_buffer 32
    opcache.jit not defined
    opcache.jit_bisect_limit 0
    opcache.jit_blacklist_root_trace 16
    opcache.jit_blacklist_side_trace 8
    opcache.jit_buffer_size 0
    opcache.jit_debug 0
    opcache.jit_hot_func 127
    opcache.jit_hot_loop 64
    opcache.jit_hot_return 8
    opcache.jit_hot_side_exit 8
    opcache.jit_max_exit_counters 8192
    opcache.jit_max_loop_unrolls 8
    opcache.jit_max_polymorphic_calls 2
    opcache.jit_max_recursive_calls 2
    opcache.jit_max_recursive_returns 2
    opcache.jit_max_root_traces 1024
    opcache.jit_max_side_traces 128
    opcache.jit_max_trace_length 1024
    opcache.jit_prof_threshold 0
    opcache.lockfile_path /tmp
    opcache.log_verbosity_level 1
    opcache.max_accelerated_files 371689
    opcache.max_file_size 0
    opcache.max_wasted_percentage 0.05
    opcache.memory_consumption 2 Gt (2634022912)
    opcache.opt_debug_level 0

    opcache.optimization_level
    CSE, STRING construction
    Constant conversion and jumps
    ++, +=, series of jumps
    INIT_FCALL_BY_NAME -> DO_FCALL
    CFG based optimization
    DFA based optimization
    CALL GRAPH optimization
    SCCP (constant propagation)
    TMP VAR usage
    NOP removal
    Merge equal constants
    Adjust used stack
    Remove unused variables
    DCE (dead code elimination)
    Inline functions

    opcache.preferred_memory_model not defined
    opcache.preload /etc/php/preload.php
    opcache.preload_user www-data
    opcache.protect_memory false
    opcache.record_warnings false
    opcache.restrict_api not defined
    opcache.revalidate_freq 2
    opcache.revalidate_path false
    opcache.save_comments true
    opcache.use_cwd true
    opcache.validate_permission false
    opcache.validate_root false
    opcache.validate_timestamps false
    Plugin Author nierdz

    (@mnttech)

    Hi,

    I’m sorry but I can’t find something in your configuration explaining this…

    What PHP flavour are you using ? How did you install it ?

    Thread Starter Juuso Turunen

    (@juusoturunen)

    Hi

    This is php-fpm, installing just basic sudo apt install php8.3-fpm. And then some configurations to the php.ini file, like memory limit etc.

    Plugin Author nierdz

    (@mnttech)

    Can you paste the result of a php -v ?

    Thread Starter Juuso Turunen

    (@juusoturunen)

    PHP 8.3.8 (cli) (built: Jun 8 2024 21:33:58) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.3.8, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.8, Copyright (c), by Zend Technologies

    Thread Starter Juuso Turunen

    (@juusoturunen)

    Okay, it is the opcache.validate_timestamps on php.ini.

    If it is set to 0, there is no “timestamp” key. After I set it to 1, now I see “timestamp” when calling opcache_get_status()

    Thread Starter Juuso Turunen

    (@juusoturunen)

    But I prefer to keep it set to 0.

    Plugin Author nierdz

    (@mnttech)

    Ok, thank you for this information.

    This is weird cause I can’t reproduce this behaviour but I’ll filter this warning in the next release.

    And you’re right, in production environment opcache.validate_timestamps should be disable.

    • This reply was modified 1 year, 8 months ago by nierdz.
    Thread Starter Juuso Turunen

    (@juusoturunen)

    Weird indeed… I just changed the value of opcache.validate_timestamps to 1, and of course restarted php process.

    But any way thank you and keep up the good work! πŸ™‚

    Juuso

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘PHP Warning: Undefined array key “timestamp”’ is closed to new replies.