• I am getting a warning on the top of the page after updating to PHP 8,0:
    Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported in /home/www/helsevejen.dk/wp-config.php on line 50

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • I’d start by looking at line 50 of your wp-config.php file. I’m guessing you’re using something like:

    define( ‘DB_USER’, ‘my_db_username’, true);

    Since PHP 8, defining case-insensitive constants have been removed.

    If you paste your actual line here, I may be able to give some more tips. (do not post any credentials, of course)

    Thread Starter Christina Weisgard

    (@cweisgard)

    Line 50 in the wp-config.php file starts with this: define( ‘SECURE_AUTH_KEY’, ‘SECURE_AUTH_KEY’,

    Thread Starter Christina Weisgard

    (@cweisgard)

    I have switched back to PHP 7,4 but haven’t resolved the issue with 8,0.

    Hi,

    It looks like your wp-config is using define(…) With the third parameter (either true or false), which is no longer a part of PHP8. You didn’t paste the full line, though, so it’s hard to verify.

    If that line ends with something like
    , true );
    Or
    , false );

    You want to remove the true/false and the preceding comma.
    But again, you didn’t paste the full line so it’s hard to know for sure. Good luck!

    Thread Starter Christina Weisgard

    (@cweisgard)

    There isn’t a true or false after the preceding comma – just the Auth key number.

    Thread Starter Christina Weisgard

    (@cweisgard)

    But it does have it twice. define( ‘SECURE_AUTH_KEY’, ‘SECURE_AUTH_KEY’,
    I don’t write PHP so I am on unknown territory
    But could this be the issue? Or is it supposed to looklike that?

    > But could this be the issue

    Wow, yes, I believe that is exactly the issue! I assumed it was a typo in your forum post.

    So, by having that appear twice, you’re actually using ‘SECURE_AUTH_KEY’ AS the value for your key! (instead of the crazy long value that should come later)

    The line should look like this:

    define(‘SECURE_AUTH_KEY’, ‘some-big-long-thing’);

    Thread Starter Christina Weisgard

    (@cweisgard)

    I just uploaded the corrected version and set the PHP to 8,0 now I have to wait about 20 minutes to see the result. Hoping this works!

    Thread Starter Christina Weisgard

    (@cweisgard)

    So far so good!! Yeeah!
    Thank you so much for your help!

    Glad to hear it and happy to help. Cheers!

    Thread Starter Christina Weisgard

    (@cweisgard)

    It’s working!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Error after going from PHP 7,4 to 8,0’ is closed to new replies.