admin管理员组文章数量:1173665
I accidentally changed the url of my wordpress page, which I finally managed to restore in phpmyadmin, the first page of my website works, but the second page doesn't, and I can't even log in to the admin interface because it throws this error message:
Fatal error: Uncaught ValueError: setcookie(): "path" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014" in C:\xampp\htdocs\hh\wp-login.php:481 Stack trace: #0 C:\xampp\htdocs\hh\wp-login.php(481): setcookie('wordpress_test_...', 'WP Cookie check', 0, '/hh\r\n/', '', false) #1 {main} thrown in C:\xampp\htdocs\hh\wp-login.php on line 481 This is the part of the code: if ( SITECOOKIEPATH !== COOKIEPATH ) { setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure ); }
I looked to see if I had hit something there, but no. I've also tried to replace it with a code copied from github, but that doesn't work either. Thank you in advance for your help!
I accidentally changed the url of my wordpress page, which I finally managed to restore in phpmyadmin, the first page of my website works, but the second page doesn't, and I can't even log in to the admin interface because it throws this error message:
Fatal error: Uncaught ValueError: setcookie(): "path" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014" in C:\xampp\htdocs\hh\wp-login.php:481 Stack trace: #0 C:\xampp\htdocs\hh\wp-login.php(481): setcookie('wordpress_test_...', 'WP Cookie check', 0, '/hh\r\n/', '', false) #1 {main} thrown in C:\xampp\htdocs\hh\wp-login.php on line 481 This is the part of the code: if ( SITECOOKIEPATH !== COOKIEPATH ) { setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure ); }
I looked to see if I had hit something there, but no. I've also tried to replace it with a code copied from github, but that doesn't work either. Thank you in advance for your help!
Share Improve this question asked Oct 20, 2022 at 2:49 SviccSvicc 11 bronze badge1 Answer
Reset to default 2The error message you see points to this part within the wp-login.php file:
setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure );
to its "path", which is the 4th parameter:
SITECOOKIEPATH
If you check how that constant is defined, that is:
define( 'SITECOOKIEPATH', preg_replace( '|https?://[^/]+|i', '', get_option( 'siteurl' ) . '/' ) );
meaning the "siteurl" option of WordPress defines it, which would come from your admin area Settings -> General -> WordPress Address (URL). This is stored within the [prefix]_options
database table, so that is where you should try to fix your url: option_name
-> siteurl
本文标签: phpWhy can39t I enter the wordpress admin interface
版权声明:本文标题:php - Why can't I enter the wordpress admin interface? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1737629387a1999533.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论