简体   繁体   中英

PHP at WordPress site cannot create cookie only on Login page

I've experience issue with wordpress on centos 7 with httpd, I can't login and it say cookie block. I've try on some device the result is also same.

I've try a lot of recommendation in and not working,

for example

define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', false);
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

this one isn't working.

Or set cookie to my domain also not working.

I also try to create a file using tutorial from https://www.w3schools.com/php/func_network_setcookie.asp and also not working. I'm not sure this is server side problem or wordpress. the funny thing is the cookies are created if visiting the homepage, so the problem is only on login page

So anyone have ever experience same issue with mine? or any solution for my problem?

I change the server to NGINX and it's work normal, but this is not solution that I want since I want my server running on Apache

try to add this code on wp-config.php :

define('COOKIE_DOMAIN’, false);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM