• Resolved op2409

    (@op2409)


    Hi,
    since i changed my php form 7.4 to 8.0 or 8.1 the 2 Factor Authentification do not work. The email with numbers are sent but i cant see the form to fill in . Instead i got “Error thrown Undefined constant “AUTOSAVE_INTERVAL”.

    Whats wrong?
    thanx Oliver

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter op2409

    (@op2409)

    This error occurs if i want to get in as Superadministrator in my multisteblog. Regular admin doesnt have this problem.

    Plugin Author gioni

    (@gioni)

    Could you share more details on the error? Normally, a few lines of code (line numbers) are shown along with an error message.

    Thread Starter op2409

    (@op2409)

    Hi Gregory,

    i run the newest download of cerber, i think its 9.3 and there s no other message than “Error thrown Undefined constant “AUTOSAVE_INTERVAL” and a white site. As i told, it occurs only when i want to log in as Superadministrator. I ve run cerber since two years and i did not have any probs. I only can login when i disable cerber plugin.
    thanx

    Plugin Author gioni

    (@gioni)

    Could you check the server error log for related entries?

    Thread Starter op2409

    (@op2409)

    that the php-error log if i want to log in:

    31-Oct-2022 11:10:48] NOTICE: using inherited socket fd=3, "/run/php-fpm-hypnose1.sock"
    [31-Oct-2022 11:10:48] NOTICE: fpm is running, pid 5698
    [31-Oct-2022 11:10:48] NOTICE: ready to handle connections
    [31-Oct-2022 11:10:48] NOTICE: systemd monitor interval set to 10000ms
    [31-Oct-2022 11:13:04] WARNING: [pool www] child 7386 said into stderr: "[31-Oct-2022 11:13:04 Europe/Berlin] PHP Warning:  Constant WP_CONTENT_URL already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 90"
    [31-Oct-2022 11:13:04] WARNING: [pool www] child 7386 said into stderr: "[31-Oct-2022 11:13:04 Europe/Berlin] PHP Warning:  Constant AUTH_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 96"
    [31-Oct-2022 11:13:04] WARNING: [pool www] child 7386 said into stderr: "[31-Oct-2022 11:13:04 Europe/Berlin] PHP Warning:  Constant SECURE_AUTH_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 97"
    [31-Oct-2022 11:13:04] WARNING: [pool www] child 7386 said into stderr: "[31-Oct-2022 11:13:04 Europe/Berlin] PHP Warning:  Constant LOGGED_IN_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 98"
    [31-Oct-2022 11:13:04] WARNING: [pool www] child 7386 said into stderr: "[31-Oct-2022 11:13:04 Europe/Berlin] PHP Warning:  Constant NONCE_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 99"
    Thread Starter op2409

    (@op2409)

    Hi Gregory,
    here s the newest log – any opinion?
    thanx Oliver
    php error log
    `[03-Nov-2022 07:17:06] NOTICE: error log file re-opened
    [03-Nov-2022 07:17:06] WARNING: [pool www] child 16956 exited on signal 10 (SIGUSR1) after 280.576927 seconds from start
    [03-Nov-2022 07:17:06] NOTICE: [pool www] child 20529 started
    [03-Nov-2022 07:17:06] WARNING: [pool www] child 16415 exited on signal 10 (SIGUSR1) after 345.960627 seconds from start
    [03-Nov-2022 07:17:06] NOTICE: [pool www] child 20532 started
    [03-Nov-2022 07:17:25] WARNING: [pool www] child 20529 said into stderr: “[03-Nov-2022 07:17:25 Europe/Berlin] PHP Warning: Constant WP_CONTENT_URL already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 90”
    [03-Nov-2022 07:17:25] WARNING: [pool www] child 20529 said into stderr: “[03-Nov-2022 07:17:25 Europe/Berlin] PHP Warning: Constant AUTH_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 96”
    [03-Nov-2022 07:17:25] WARNING: [pool www] child 20529 said into stderr: “[03-Nov-2022 07:17:25 Europe/Berlin] PHP Warning: Constant SECURE_AUTH_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 97”
    [03-Nov-2022 07:17:25] WARNING: [pool www] child 20529 said into stderr: “[03-Nov-2022 07:17:25 Europe/Berlin] PHP Warning: Constant LOGGED_IN_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 98”
    [03-Nov-2022 07:17:25] WARNING: [pool www] child 20529 said into stderr: “[03-Nov-2022 07:17:25 Europe/Berlin] PHP Warning: Constant NONCE_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 99”
    [03-Nov-2022 07:18:22] WARNING: [pool www] child 20532 said into stderr: “[03-Nov-2022 07:18:22 Europe/Berlin] PHP Warning: Constant WP_CONTENT_URL already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 90”
    [03-Nov-2022 07:18:22] WARNING: [pool www] child 20532 said into stderr: “[03-Nov-2022 07:18:22 Europe/Berlin] PHP Warning: Constant AUTH_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 96”
    [03-Nov-2022 07:18:22] WARNING: [pool www] child 20532 said into stderr: “[03-Nov-2022 07:18:22 Europe/Berlin] PHP Warning: Constant SECURE_AUTH_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 97”
    [03-Nov-2022 07:18:22] WARNING: [pool www] child 20532 said into stderr: “[03-Nov-2022 07:18:22 Europe/Berlin] PHP Warning: Constant LOGGED_IN_SALT already defined in /var/www/virtual/hypnose1/html/wp-config.php on line 98”
    [03-Nov-2022 07:18:22] WARNING: [pool www] child 20532 said into stderr:

    apache log
    [Thu Nov 03 05:19:49 2022] [error] [pid 19681] mod_autoindex.c(2326): [client 51.255.0.0] AH01276: Cannot serve directory /var/www/virtual/hypnose1/html/wp-includes/css/dist/block-library/: No matching DirectoryIndex (index.html,index.htm,index.html.var,index.php,index.cgi,index.sh,nocontent.html) found, and server-generated directory index forbidden by Options directive

    @gioni,

    Any update on this? I am also facing similar issue after upgrading to PHP 8.1.

    Got error 'PHP message: PHP Fatal error: Uncaught Error: Undefined constant "AUTOSAVE_INTERVAL" in /wp-includes/script-loader.php:1804\nStack trace:\n#0 /wp-includes/class-wp-hook.php(308): wp_just_in_time_script_localization()\n#1 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#2 /wp-includes/plugin.php(517): WP_Hook->do_action()\n#3 /wp-includes/script-loader.php(2012): do_action()\n#4 /wp-content/plugins/wp-cerber/cerber-2fa.php(472): print_head_scripts()\n#5 /wp-content/plugins/wp-cerber/cerber-2fa.php(349): CRB_2FA::show_2fa_page()\n#6 /wp-content/plugins/wp-cerber/cerber-load.php(1750): CRB_2FA::restrict_and_verify()\n#7 /wp-content/plugins/...', referer: https://test.com/wp-login.php in the console.

    Just saw this thread and wanted to post my log as well. Also running PHP 8 on my servers:

    [14-Dec-2022 20:35:47 UTC] PHP Fatal error:  Uncaught Error: Undefined constant "AUTOSAVE_INTERVAL" in /var/www/public/wp-includes/script-loader.php:1804
    Stack trace:
    #0 /var/www/public/wp-includes/class-wp-hook.php(308): wp_just_in_time_script_localization('')
    #1 /var/www/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #2 /var/www/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #3 /var/www/public/wp-includes/script-loader.php(2012): do_action('wp_print_script...')
    #4 /var/www/public/wp-content/plugins/wp-cerber/cerber-2fa.php(472): print_head_scripts()
    #5 /var/www/public/wp-content/plugins/wp-cerber/cerber-2fa.php(349): CRB_2FA::show_2fa_page()
    #6 /var/www/public/wp-content/plugins/wp-cerber/cerber-load.php(1732): CRB_2FA::restrict_and_verify(1)
    #7 /var/www/public/wp-content/plugins/wp-cerber/cerber-load.php(1700): cerber_restrict_user(1)
    #8 /var/www/public/wp-includes/class-wp-hook.php(308): {closure}('')
    #9 /var/www/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #10 /var/www/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #11 /var/www/public/wp-includes/pluggable.php(48): do_action('set_current_use...')
    #12 /var/www/public/wp-includes/user.php(3610): wp_set_current_user(1)
    #13 /var/www/public/wp-includes/pluggable.php(70): _wp_get_current_user()
    #14 /var/www/public/wp-includes/capabilities.php(873): wp_get_current_user()
    #15 /var/www/public/wp-content/plugins/enable-media-replace/classes/emr-plugin.php(45): current_user_can('upload_files')
    #16 /var/www/public/wp-includes/class-wp-hook.php(308): EnableMediaReplace\EnableMediaReplacePlugin->runtime('')
    #17 /var/www/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #18 /var/www/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #19 /var/www/public/wp-settings.php(480): do_action('plugins_loaded')
    #20 /var/www/public/wp-config.php(143): require_once('/var/www/public...')
    #21 /var/www/public/wp-load.php(50): require_once('/var/www/public...')
    #22 /var/www/public/wp-blog-header.php(13): require_once('/var/www/public...')
    #23 /var/www/public/index.php(17): require('/var/www/public...')
    #24 {main}
      thrown in /var/www/public/wp-includes/script-loader.php on line 1804

    Found a fix for this. In your wp-config add this line to fix the error:

    define( 'AUTOSAVE_INTERVAL', 60 );

    Anonymous User 20702716

    (@anonymized-20702716)

    This worked for me, thank you!

    @gioni,

    Does WP-Cerber consider this issue as a bug or not? Does the changes suggested is an ideal solution or do we need to change anything else as well?

    Plugin Author gioni

    (@gioni)

    Yes, it’s a bug. This week we release a new version of WP Cerber with a bug fix.

    @gioni,
    Thanks for the update. Looking forward for the bug fix.

    Plugin Author gioni

    (@gioni)

    Hi! It’s been fixed in WP Cerber 9.4: https://wpcerber.com/wp-cerber-security-9-4/

    @manojmohandev @lenaccp @esg450

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘2Factor authentification with PHP 8.0 Not Working’’ is closed to new replies.