Php5 fpm sessions /tmp

Having an issue where some wordpress sites on a linode are acting weird. For example, I can logout of the wordpress admin, then click back or paste in the admin dashboard link and still have access as if logged in. I can add an item to a cart and cart will be empty. On first attempt to login to admin, I see error "ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress." even though cookies are enabled in my browsers. Second attempt I get in fine.

Got me to thinking about the /tmp folder with multiple domains. drwxrwxrwt root root /tmp/ doesn't seem like it would let the individual domains to read/write to it, only root. The sites all run as different socket names. In each domain.conf, they all define evn[TMP] = /tmp. Should these have unique folders closer to their www root. So something like this in each domain.conf evn[TMP]= /srv/www/domain.com/tmp, then each site would have permissions to read/write to their own tmp folders.

10 Replies

drwxrwxrwt root root /tmp/ means it's world writable. Also wordpress doesn't use PHP sessions so tmp isn't your problem.

Are your wordpress/php cookie domain settings correct?

@obs:

 drwxrwxrwt root root /tmp/

means it's world writable. Also wordpress doesn't use PHP sessions so tmp isn't your problem.

Are your wordpress/php cookie domain settings correct?

How do I confirm this? I can see there are cookies in firebug and they have values. I've disabled php apc and varnish and issue remains. Cookie path says /.

If they're appearing in firebug they're probably ok. What's the domain?

The login issue I notice on all domains on the linode, but only one has ecommerce where the cart basically doesn't work from an issue with the cookies. colorcog.com

I just added an item to the cart and it works fine for me I can reach the checkout and the item stays in there.

That works now with either php apc or varnish off (not sure which one causes that yet), but if you had an account and tried to login, it would continue showing the login link as if you didn't just login. The login issue happend with the wp-admin area too. Entering right credentials reloads page showing cookies must be enabled. This happens on all the WP sites on my linodes. If I then enter right info, I get into admin. If I click logout, it goes to login form like I logged out, but I can click back and navigate through admin as if I was still logged in. Cookie issue somewhere.

Seems same issue here, no cookie set on hitting the login page. Still looking into it, maybe WP and not my server config.

http://wordpress.org/support/topic/cook … 371/page/2">http://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/2

I've tried a few php cookie tests and they always say cookies are disabled. I've checked a few different browsers to make sure this isn't the case. I've check on an ipad where cookie settings haven't been touched. Any ideas what issue on server could be that makes browser think cookies are disabled?

But a javascript cookie test works fine, I can set and get the value.

Have you tried removing varnish completely? I see it's still proxying requests back to nginx.

It was varnish killing the initial test cookie when hitting the wordpress login page, also mentioned here: http://wordpress.org/support/topic/cook … eplies=105">http://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371?replies=105. In the end I removed varnish as I was having issue on front end of a cart as well. All is good now with just php apc and w3 total cache.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct