Web Development Thread, PHP Sessions not working in Coding and Web Development; Hi,
I seem to have a sudden problem with PHP Sessions. I wrote a small app a couple of years ...
5th September 2008, 01:08 PM #1
PHP Sessions not working
I seem to have a sudden problem with PHP Sessions. I wrote a small app a couple of years ago for one of out deputy heads. It's worked fine all through last year.
This term the sessions, all of a sudden, don't seem to be staving on the server.
When session_start() is called within the php script, a cookie IS being created on the local machine, I can see it in the Firefox cookies browser. But when I look in C:/temp - the default php session cache - the sessions has not been created.
I have tried changing the location of the session cache in php.ini and restarting Apache but still no luck.
I'm running PHP4 and Apache2 on Windows XP.
Can anyone give me any pointers as to where to look to solve this one?
IDG Tech News
9th September 2008, 02:31 PM #2
The only thing that I can really think of straight up:
Make sure session_start() is the first thing that is called and nothing else gets output to the browser (including any header() calls).
9th September 2008, 02:39 PM #3
Check the permissions on the session directory on the server.
9th September 2008, 02:41 PM #4
did both of those, like I say was working before summer - after summer nothing. I came up with a solution in the end! One of the Junior Techs had built a XAMPP server to do some development testing with. I migrated the database and website to that and it runs fine - go figure!
By Jonny_sims in forum Thin Client and Virtual Machines
Last Post: 13th May 2010, 12:30 AM
By Griffo in forum Network and Classroom Management
Last Post: 4th September 2008, 06:59 PM
By Danieltopia in forum Wireless Networks
Last Post: 10th April 2008, 11:25 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)