pluggable.php is where PHP discovered the error, but it’s unlikely to be the root cause. More likely your theme or a plugin has tried to alter cookies set in pluggable.php via some filter hook. Their attempt didn’t work as expected.
Narrow down the root cause by switching themes and deactivating all plugins. Since you cannot login, this must be done via FTP or your hosting file manager. In /wp-content/themes/, rename your theme’s folder, forcing WP to use one of the other installed themes, ideally a twenty* default theme if it’s available. In /wp-content/, also rename the plugins folder.
You should now be able to login. Restore the original folder names. The switched to theme will remain active and plugins will remain inactive. Restore your normal theme, then plugins, one at a time. Test login ability after each. When you cannot login again, the last activated is the cause. Take up the issue with that module’s author.
Thread Starter
Ron5
(@ron5)
I renamed my theme’s folder and renamed the plugins folder. Loading the website (in Wampserver) results in a blank screen. Doing a login by additionally typing wp-admin results in the same error: Warning: Cookie paths cannot contain any of the following ‘,; \t\r\n\013\014’ in C:\wamp64\www\jgib2021\wp-login.php on line 416
As default theme 2021 is present, but is not loading.
Php version 7.4.14 is present in Wampserver. So that’s OK.
OK, that error message is a better clue than the first 🙂
Besides addressing that, I think you may need to create a new, empty /plugins/ folder. Once you get logged in, remove it and restore the original.
Do you have the constant COOKIEPATH defined with a custom value in wp-config.php? If so, there’s line feed chars within the quotes that need to be removed.
If you don’t have a custom definition, then the line feeds are lurking in your Home URL and likely Site URL settings values. Probably hitched a ride when you copy/pasted the URL from something else. Because you cannot login, you’d need to change these values directly via the phpMyAdmin app. I think you launch it from the WAMP control panel.
Navigate to the WP database and view the wp_options table. The siteurl and home options should be the first entries, or at least close to the first. Edit each one to remove any extraneous chars in option_value. The URLs here should also not have any trailing slashes.
Thread Starter
Ron5
(@ron5)
Hello,
I made an empty folder plugins in my project.
There is no constant COOKIEPATH defined in wp-config.php
In the table wp_options siteurl is http://localhost:8080/jgib2021 and home is http://localhost:8080/jgib2021 with jgib2021 being the website folder.
Loading the website results in a blank screen. Upon logging in the above warnings stays. The 1st error is in wp-login.php. The next errors are in wp-includes/pluggable.php .
I tried several browsers. In every browser it is the same situation.
Typing http://localhost:8080/jgib2021/wp-admin results in the following redirection from WordPress
http://localhost:8080/jgib2021/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%3A8080%2Fjgib2021%2Fwp-admin%2F&reauth=1
Other websites run smoothly in Wampserver and are loggable.
On what line does the error in pluggable.php occur? If it’s line 1004, it’s the same COOKIEPATH issue as in wp-login.php line 416.
Unless COOKIEPATH is set in wp-config.php, it should be set to the home option value. The only way I can imagine how it could be something different is if the core files somehow have become corrupted.
To correct corrupted core files, perform a manual update from a freshly downloaded WordPress .zip file. Even if the “update” results in the same version.
Thread Starter
Ron5
(@ron5)
I found the problem. By changing the web addresses in the database a space has slipped before http://localhost Apparently this is not a problem for WordPress and Wampserver to display the website, but it is a problem to log in. WordPress does not make cookies when there is a space in an web address. Removing the space solved the problem. This comes from copying http://localhost to fast into the clip board.
Tx for the help anayway.