Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Php5 fpm sessions /tmp
PostPosted: Sat Nov 16, 2013 12:12 am 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
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.


Top
   
PostPosted: Sat Nov 16, 2013 10:07 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Code:
 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?

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Sat Nov 16, 2013 10:35 am 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
obs wrote:
Code:
 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 /.


Top
   
PostPosted: Sat Nov 16, 2013 5:16 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
If they're appearing in firebug they're probably ok. What's the domain?

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Sun Nov 17, 2013 3:20 pm 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
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


Top
   
PostPosted: Sun Nov 17, 2013 6:01 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
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.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Sun Nov 17, 2013 6:18 pm 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
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.


Top
   
PostPosted: Sun Nov 17, 2013 6:29 pm 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
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


Top
   
PostPosted: Mon Nov 18, 2013 5:44 pm 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
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.


Top
   
PostPosted: Tue Nov 19, 2013 3:41 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Have you tried removing varnish completely? I see it's still proxying requests back to nginx.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Fri Nov 22, 2013 4:43 pm 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
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. 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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group