upgrade to XAMPP 1.8.2-1/PHP 5.4.x – always lose session

Problems with the Windows version of XAMPP, questions, comments, and anything related.

upgrade to XAMPP 1.8.2-1/PHP 5.4.x – always lose session

Postby marcu@localhorst » 23. August 2013 16:00

Hi,
I recently upgraded my Win 7 64bit maschine with XAMPP 1.8.2 -1 (first portable version, now full version/full paths)
The trouble I'd run into is, that I lose my sessions after approx. 3 minutes.
All the scripts were running as expected before, with php 5.3 now with 5.4 (and the new xampp installation) I got constantly logged out of my applications after ~3 minutes inactivity.

The only modification on session directives I did in php.ini is
Code: Select all
session.use_only_cookies = On
(because I thought this is related)

Everything else is just standard settings (garbage collector etc)

I don't get any Errors or Warning, and the Sessions are written to /temp - I don't see anything wrong here.
But it's hardly possible to work in a cms backend without clicking around constantly to keep the session running.

So did someone experienced something similar?
Is there anything I should check?

My doc_root is outside of /xampp
I mapped it like this:

localhost/ -> E:\xampp\htdocs*
local.mydomain.de/ -> E:\WEB\mydomain.de\*

As I said - everything is working as expected. Just the Sessions are over too soon.

Thanks for any hint
Marcus
marcu@localhorst
 
Posts: 2
Joined: 23. August 2013 15:31
XAMPP Version: 5.6.3
Operating System: Win 7 64bit

Re: upgrade to XAMPP 1.8.2-1/PHP 5.4.x – always lose session

Postby marcu@localhorst » 23. August 2013 19:33

Ok, someone slap me with these lines of code that I found in another (actively developed) project

Code: Select all
ini_set('session.gc_maxlifetime',10);
ini_set('session.gc_probability',1);
ini_set('session.gc_divisor',1);


I observed the /tmp folder and saw that session files disappeared after I used this project site.
Another site which use mysql as session storage didn't suffer from losing the session.
So I checked the session management of this project site and found out that some idiot (me) once played with the Garbage Collection settings in script runtime and due some PHP settings it wasn't possible to overwrite these values in runtime.
And since it hasn't any effect at all, I forgot about that code. (I might be wrong here since session.gc_* can be changed anywhere via PHP_INI_ALL)
So the update to this new XAMPP version came with some setting I didn't know about and the ini_set gc_* did its job to 100% and collected any not active session :)

I feel so dumb to bother you with this...
please mark as solved!

best
marcus :oops:

PS: At least it helped to write down and explain the problem.
marcu@localhorst
 
Posts: 2
Joined: 23. August 2013 15:31
XAMPP Version: 5.6.3
Operating System: Win 7 64bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 70 guests