0

I am trying to get WordPress to run on PHP-CGI which I call from my ExpressJS (Node JS) server. After getting some bugs worked out on my end, I finally got the front-end working. I can login and the admin bar shows up, but when I try to access any of the admin pages, I get redirected to the login page. This applies to all admin pages including /wp-admin/user/profile.php.

I've pretty much ruled out anything in the NodeJS setup -- it is definitely communicating and even setting the logged_in cookie -- but it could still be corrupting something on the return trip. In the request there are two logged_in cookies set, but when it gets to my theme's functions.php file, $_COOKIE only has one logged_in cookie and a test cookie, no auth cookie.

So, how do I check which cookies WP is sending so I can see if that is what is getting to my browser. And besides that, what else might be the problem.

I can't get into the admin area, so everything is still default.

Running WP 4.4.1 and PHP 5.6.12. No .htaccess or Apache directives, but I have complete control over everything going into PHP-CGI.

Update: Here is the Set-Cookie header being sent in the response to the login post request:

'Set-Cookie': ' wordpress_logged_in_c8a8dd254728998d538ca196677bea9c=Admin%7C1452550201%7CycLtSl7NAXlefnelrxvq9SxBjE8YLKBO8Bkg2yVY9gu%7Cb8d3bd326e5e47c3b22b7518d989f44786f2b89e42434a0585d7b507d0671bda; path=/wp-master/; httponly',

To anyone trying to break in: This is running on my local computer, not online.

  • Is it possible that this depends on the browser? – fuxia Jan 9 '16 at 1:05
  • Well, I don't know, but other WordPress sites work perfectly fine on the same browser. – Arlen Beiler Jan 9 '16 at 3:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.