Page 1 of 1
Sessions save path problem
Posted: Tue Jul 23, 2002 2:57 pm
by RandomEngy
I upgraded to 4.2.2 today, and suddenly my server doesn't remember session variables past the page they were declared. I'm running on a windows machine, and to update I unzipped the folder for 4.2.2 and overwrote files to update from 4.2.1 . Was this the wrong way?
I've got a session_start(); at the top of every page, and declare a session variable
When I link to another page, it doesn't know what $_SESSION['test'] is.
Is there any good way to fix this? Maybe some of the old files from 4.2.1 are interfering. Would a re-install of PHP help? Maybe a setting I need to change? Thanks.
Posted: Tue Jul 23, 2002 3:15 pm
by RandomEngy
Just found this comment on session_start() at php.net:
Someone asked about session_start being an undefined function earlier. A few linux distributions have made the move of separating the session code out from the core php code as of php4.2.1 . So if you have upgraded your core php rpm and sessions aren't working anymore, you have to go find a separate rpm for php-session - and then specifically turn it on as a DSO in your apache conf files. Same with several other packages.
Maybe this is it? If so, how do I do what he suggested?
Posted: Tue Jul 23, 2002 4:17 pm
by RandomEngy
Excellent! Found out what was wrong. It wasn't PHP 4.2.2 at all! While I was installing PHP 4.2.2 I deleted a defunct PHP folder, and that just happened to be the session.save_path target.
Now a new problem: I can't get the save path to change to what I want it to be. I have session.save_path = "c:/php4/sessiondata" in my php.ini in my C:\Windows\System folder but when I restart the server and run phpinfo again, the save path is still pointing to the defunct folder.
Thanks.
Posted: Tue Jul 23, 2002 9:29 pm
by hob_goblin
try searching for more php.ini files on your system
Posted: Wed Jul 24, 2002 1:50 am
by twigletmac
The php.ini (on Win 9x/XP) is normally stored in C:\Windows not C:\Windows\system. Maybe you've got two like hob_goblin said?
Mac
Posted: Wed Jul 24, 2002 9:07 am
by RandomEngy
Ahh that fixed it, thanks.