• Resolved wabetainfo

    (@wabetainfo)


    Hi. I see this warning multiple times in my log file:

    PHP Warning: Undefined array key "HTTP_HOST" in /wp-content/plugins/wp-cloudflare-page-cache/libs/fallback_cache.class.php on line 443

    Plugin version: 5.1.4

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Kush

    (@kushnamdev)

    Hi there,

    Thanks for reporting this. We’re not able to reproduce this on our side, so we’ll need a bit more detail to investigate:

    • The full error message (from your PHP error log).
    • Your WordPress and PHP versions.

    With this information we can check if it’s coming directly from the plugin or being triggered by something else in your setup.

    Best regards,

    Thread Starter wabetainfo

    (@wabetainfo)

    Hi,

    Thanks for your message. I fixed the issue by adding this code to the wp-config file:

    if ( ! isset( $_SERVER[‘HTTP_HOST’] ) || empty( $_SERVER[‘HTTP_HOST’] ) ) {

        $_SERVER[‘HTTP_HOST’] = ‘mywebsite.com’;

    }

    Since I do not have any subdomain, I could use this code without any other conflicts. Thanks again.

    Plugin Support Kush

    (@kushnamdev)

    great thanks for the update.

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

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