Page 1 of 1

Cant log - SESSION problem

Posted: Fri Mar 09, 2018 4:12 pm
by ciberyan
Hello to everybody
I start this on the famous post "How to Protect a Download"
I use it since years but since few days/weeks, I cant log any more
Ie, when I fill name and pwd as usual, the system keep asking me to log
I display the user name and it say "Not connected, of course everything is fine (and doesnt change since times)
Naval point me on SESSIONS problem, not saved, but I have very few if any, way to act here
My site is hosted on AWS. I have a buffer zone, where I publish and here everything works well, but when it goes live, I cant log anymore

Here is it what my IT says (they host also the corporate web site there) :

I have checked, and PHP does not have a session_save_path variable set in php.ini. It does, however, use /tmp/ on the server for temp session files, which we use in IT all the time, to keep users connected to their own profiles and accounts.

One thing to keep in mind is that when the site is live it is on multiple servers in multiple Amazon data centres, using load balancing, the load balancer will keep the user to the same server, while the session is alive, based on the SESSION_ID cookie, which PHP issues and uses.

> So your application needs to understand that it will need to use php sessions to keep to one server


Anyone also on AWS ?? with problem ??

Thanks in advance

Re: Cant log - SESSION problem

Posted: Fri Mar 09, 2018 4:22 pm
by Pablo
Usually this error indicates that the sessions tmp folder on the server is full or not writable.
Only the web host can fix this.
So your application needs to understand that it will need to use php sessions to keep to one server
The application does not need to know how sessions are managed by the server. It just uses this standard PHP feature. It is up to the web host to configure it correctly.
If it suddenly has stopped working then it can only be an issue on the server side, right?

Re: Cant log - SESSION problem

Posted: Fri Mar 09, 2018 4:32 pm
by ciberyan
Thanks Pablo

I have no doubt it is a server side problem but I was looking for some heavy argument to put in their face :D

Remember, we speak to Amazon ... so convince them that the problem is on their side is not easy

Thanks

Re: Cant log - SESSION problem

Posted: Fri Mar 09, 2018 4:35 pm
by Pablo
From my own experience, there has never been another reason of PHP sessions not working.
You can ask then to look in the PHP error log to see why it no longer works.

Maybe this script is helpful?
https://dodona.wordpress.com/2008/08/26 ... -sessions/

Re: Cant log - SESSION problem

Posted: Fri Mar 09, 2018 4:56 pm
by ciberyan
Thanks for clue Pablo