You can try adding the following lines to your wp-config.php
file:
define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');
Here are some reference links related to the issue:
Thread Starter
Nos402
(@nos402)
That just results in a error telling me to remove those lines from my wp-config.
Could you provide a screenshot of the situation you are encountering?
Thread Starter
Nos402
(@nos402)
I can’t seem to upload an image here but it’s literally just the wordpress dashboard login screen with and error that says “Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
To assist you effectively, could you provide the URL of the website experiencing the issue? Additionally, sharing relevant system logs would help in diagnosing the problem.
1. Enabling WordPress Debug Mode
Activating the debug mode in WordPress allows for detailed error messages to be logged, facilitating the identification of issues. Here’s how to enable it:
- Access the
wp-config.php
File:
- Use an FTP client or your hosting control panel to locate the
wp-config.php
file in the root directory of your WordPress installation.
- Modify Debug Settings:
- Ensure the following lines are present and configured as shown:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);
WP_DEBUG
: Enables the debug mode.
WP_DEBUG_LOG
: Directs errors to a log file.
WP_DEBUG_DISPLAY
: Prevents errors from displaying on the website, ensuring they are only logged.
- Save and Upload:
- Save the changes and upload the modified
wp-config.php
file back to your server.
- Review the Debug Log:
- After reloading your website, WordPress will log errors to the
/wp-content/debug.log
file.
- Access this file via FTP or your hosting control panel to review the logged errors.
2. Checking Server Error Logs
Server error logs can provide insights into issues that may not be captured by WordPress’s debug log. Here’s how to access them:
- Through cPanel:
- Log in to your cPanel account.
- Navigate to the “Metrics” section and click on “Errors” to view recent error logs.
- For more detailed logs, go to “Metrics” > “Raw Access” to download the complete log files.
- Through Plesk:
- Log in to your Plesk control panel.
- Go to “Websites & Domains” and select the relevant domain.
- Click on “Logs” to view the error logs associated with that domain.
By providing the website URL and relevant logs, we can better diagnose and address the issue you’re facing.
Thread Starter
Nos402
(@nos402)
Any new site I connect a domain to has this problem but fabtribute.com is the main one I’m currently dealing with. The mentioned logs can be found here.
Based on the log content you provided, the error indicates:
[03-Dec-2024 04:23:25 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wp_kses() in /home/nos402/public_html/wp-includes/functions.php:6098
Stack trace:
#0 /home/nos402/public_html/wp-includes/functions.php(5579): wp_trigger_error()
#1 /home/nos402/public_html/wp-includes/class-wpdb.php(1333): _deprecated_function()
#2 /home/nos402/public_html/wp-content/sunrise.php(11): wpdb->escape()
#3 /home/nos402/public_html/wp-includes/ms-settings.php(47): include_once('/home/nos402/pu...')
#4 /home/nos402/public_html/wp-settings.php(156): require('/home/nos402/pu...')
#5 /home/nos402/public_html/wp-config.php(134): require_once('/home/nos402/pu...')
#6 /home/nos402/public_html/wp-load.php(50): require_once('/home/nos402/pu...')
#7 /home/nos402/public_html/wp-admin/admin.php(34): require_once('/home/nos402/pu...')
#8 /home/nos402/public_html/wp-admin/index.php(10): require_once('/home/nos402/pu...')
#9 {main}
thrown in /home/nos402/public_html/wp-includes/functions.php on line 6098
It appears that there is an issue with the WordPress core files, as the function wp_kses()
is missing or not being loaded correctly. Suggested Action
- Replace WordPress Core Files:
- Download the latest version of WordPress from the official website.
- Replace the
wp-includes
and wp-admin
folders in your website’s directory with the ones from the downloaded package.
- Ensure not to overwrite your
wp-config.php
file or the wp-content
folder, as these contain your configuration and custom data.
- Backup Before Proceeding:
- Always back up your existing files and database before making any changes to avoid data loss or further issues.
Let me know if you need further assistance!
Thread Starter
Nos402
(@nos402)
Weirdly those errors have been in the debug log LONG before this issue ever started. I’ll still experiment though.
Thread Starter
Nos402
(@nos402)
After all that, same cookies error, even with a totally fresh wp-includes and wp-admin.
Thread Starter
Nos402
(@nos402)
With a fresh install of those two folders debug mode still produces this (which I believe is identical and also long predates this issue, but has never caused any other issues):
[05-Dec-2024 04:19:26 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wp_kses() in /home/nos402/public_html/wp-includes/functions.php:6098
Stack trace: 0 /home/nos402/public_html/wp-includes/functions.php(5579): wp_trigger_error() 1 /home/nos402/public_html/wp-includes/class-wpdb.php(1333): _deprecated_function() 2 /home/nos402/public_html/wp-content/sunrise.php(11): wpdb->escape() 3 /home/nos402/public_html/wp-includes/ms-settings.php(47): include_once(‘/home/nos402/pu…’) 4 /home/nos402/public_html/wp-settings.php(156): require(‘/home/nos402/pu…’) 5 /home/nos402/public_html/wp-config.php(130): require_once(‘/home/nos402/pu…’) 6 /home/nos402/public_html/wp-load.php(50): require_once(‘/home/nos402/pu…’) 7 /home/nos402/public_html/wp-admin/admin.php(34): require_once(‘/home/nos402/pu…’) 8 /home/nos402/public_html/wp-admin/network/admin.php(13): require_once(‘/home/nos402/pu…’) 9 /home/nos402/public_html/wp-admin/network/sites.php(11): require_once(‘/home/nos402/pu…’) 10 {main}
thrown in /home/nos402/public_html/wp-includes/functions.php on line 6098
-
This reply was modified 3 months ago by
Nos402.
Thread Starter
Nos402
(@nos402)
PROGRESS…maybe.
After a millions google searches and reading many pages of results, I found one obscure reference on ONE page about commenting out //define( ‘SUNRISE’, ‘on’ );
Suddenly everything seems to be working. But don’t I need that for some functionality related to Multisite?
Thread Starter
Nos402
(@nos402)
I *think* the whole sunrise.php thing is no longer needed since domain mapping became integrated into WP. Now as to why it was never a problem until now, I don’t know, but as far as I can tell, everything seems to be fine without it.
Yes, you are right.
In the past, WordPress Multisite’s Domain Mapping functionality required the use of sunrise.php
, and the purpose of define('SUNRISE', 'on');
was to enable this feature. However, since WordPress 4.5, the Domain Mapping functionality has been integrated into the WordPress core, making the sunrise.php
file no longer necessary.
Thread Starter
Nos402
(@nos402)
I could not put any for of the define cookie line in my wp-config without it then giving me a simple error page saying to remove that line from my config. Luckily turns out that for some reason it was sunrise.php still being turned on in the config from back in the days when it was needed. No idea why it only just now started causing problems though.