+ Reply to Thread
Results 1 to 4 of 4

Thread: PHP Sessions not working

  Share/Bookmark
  1. #1

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    2,880
    Blog Entries
    9
    Thank Post
    404
    Thanked 384 Times in 337 Posts
    Rep Power
    91

    Default PHP Sessions not working

    Hi,

    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?

    Cheers

    Terry.

  2. #2

    Reputation Reputation
    Friez's Avatar
    Join Date
    Dec 2006
    Posts
    846
    Thank Post
    22
    Thanked 20 Times in 19 Posts
    Rep Power
    14

    Default

    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).

  3. #3

    Reputation
    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,445
    Thank Post
    342
    Thanked 687 Times in 576 Posts
    Rep Power
    144

    Default

    Check the permissions on the session directory on the server.

  4. #4

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    2,880
    Blog Entries
    9
    Thank Post
    404
    Thanked 384 Times in 337 Posts
    Rep Power
    91

    Default

    hi,

    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!

    Cheers
    Terry

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. MS Terminal Server Sessions
    By Jonny_sims in forum Thin Client and Virtual Machines
    Replies: 6
    Last Post: 12-05-2010, 11:30 PM
  2. Ghost sessions
    By Griffo in forum Network and Classroom Management
    Replies: 1
    Last Post: 04-09-2008, 05:59 PM
  3. Scrpting and RDP sessions
    By Danieltopia in forum Networks
    Replies: 2
    Last Post: 10-04-2008, 10:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts