Error message setcookie(): Passing null to parameter #5 ($domain) of type string is deprecated

There’s an error message that just started popping up while trying to bring up the log in page…

setcookie(): Passing null to parameter #5 ($domain) of type string is deprecated

After enabling debug mode, this seems to be where the issue is but I have no idea what to do

// store the cookie
return setcookie($key, $value, static::lifetime($lifetime), $path, $domain, $secure, $httpOnly);
}

What are your Kirby and PHP versions?

Sorry, I’m not sure. How would I find that out?

Since you don’t have access to the Panel as it sounds, the System view won’t help.

But for the Kirby version you could check the file kirby/composer.json to find the Kirby version.

For PHP, either in your webhoster config interface or if you have access to the command line on your server by running php -v.

Or by uploading a PHP file with

<?php
phpinfo();
?>

and accessing this.

Okay thank you so much. Kirby version is 3.2.4 and PHP is 8.2.23

That’s a very old Kirby version. Please, try to upgrade to the latest stable Kirby 3 version first: Release 3.10.1.1 · getkirby/kirby · GitHub. You can find the zip download link at the bottom. Make sure to make a backup and test your setup locally first if possible.

Hi again. I tried this by replacing the current Kirby folder but it didn’t seem to work, unless I did something wrong. This isn’t my area of expertise so any advice is welcome. Thanks for your help so far

Replacing the current Kirby folder is correct. What happened after you updated to Kirby 3.10.1.1? Do you still get the same error or a different one?

As soon as I delete the old Kirby folder after uploading the new one, the website breaks. Is there something else I should do to make it work?

Please make sure to upload the new Kirby directory to the exact same path as the old one. If you first upload the new one and then delete the old one, this can’t be the case.

If you are still having trouble, please be more specific about what breaks and which error message you get. We don’t have a crystal ball. :slightly_smiling_face:

Hi Lukas. The arrogant attitude is a little unnecessary. I thought this was a space to help people, not belittle them for asking for your advice with the platform

Hey @Coley, I’m sure that Lukas meant it in an arrogant way. Of course, we want to help you here. It’s just incredibly hard to debug such issues remotely. That’s why it is super important that we get as much accurate information as possible.