Hello people,
i have since this morning on my server a problem.
Each time i refresh a page which calls "session_start()", a new "sess_*" file is created in the server's /tmp folder, and it obviously avoids the session to be "stuck" to a cookie.
What can be wrong in my set up?
Thanks,
Pierre.
Strange session behavior.
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Strange session behavior.
Is your browser accepting session cookies? If you have a named session, have you called session_name()? What's the value of session_id() in your script?
Re: Strange session behavior.
My browser is accepting cookies, like the 3 others browsers i have tried on 2 different computers.
Session ID is unchanged (i think the default is PHPSESSID, set up in my /usr/local/lib/php.ini...
Also, i never call session_name in any of my scripts.
I have made several tries with / without overridding session ID and name, and the result is the same.
[EDIT] The strange thing is that it wasn't behaving like this yesterday... i'm wondering, can it be an O.S. related problem? i'm running apache 2.2.8 / php 5.2.6 both compiled from sources...[/EDIT]
Thanks for your help,
Pierre.
Session ID is unchanged (i think the default is PHPSESSID, set up in my /usr/local/lib/php.ini...
Also, i never call session_name in any of my scripts.
I have made several tries with / without overridding session ID and name, and the result is the same.
[EDIT] The strange thing is that it wasn't behaving like this yesterday... i'm wondering, can it be an O.S. related problem? i'm running apache 2.2.8 / php 5.2.6 both compiled from sources...[/EDIT]
Thanks for your help,
Pierre.
Re: Strange session behavior.
Up?...
i have reinstalled my whole system, becase my HDD was dead.
So new HDD, new apache / php compiled from source, same problem.
i have created a very basic test page Test.php, which only does "session_start();".
When i access the page, i see a file named "sess_92a1d5255e7d85e34a42aba4aa422f83" appearing in my /tmp.
If i just reload the page, another one is created, "sess_94cd5580871613484b5f78a2336451de"...
i have tried either with ini settings from php-recommended, php-dist and no php.ini...
I would really apperciate help on this please
Thanks,
Pierre.
i have reinstalled my whole system, becase my HDD was dead.
So new HDD, new apache / php compiled from source, same problem.
i have created a very basic test page Test.php, which only does "session_start();".
When i access the page, i see a file named "sess_92a1d5255e7d85e34a42aba4aa422f83" appearing in my /tmp.
If i just reload the page, another one is created, "sess_94cd5580871613484b5f78a2336451de"...
i have tried either with ini settings from php-recommended, php-dist and no php.ini...
I would really apperciate help on this please
Thanks,
Pierre.
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Strange session behavior.
Out of curiosity: try modifying $_SESSION, and see if the change carries over. Other than that, I don't know why you're seeing this behavior. (Maybe PHP is supposed to work like that?)
Re: Strange session behavior.
When i set anything inside $_SESSION, the variable is obviously wrote thru the sess_* file. But since when i reload the page another file is created, $_SESSION is empty.