Find the answer to your Linux question:
Results 1 to 5 of 5
Hey, ive got apache running on red hat 9, and i have a problem using sessions in php. The code that i use works fine on my windows box, but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2004
    Posts
    12

    PHP sessions AWOL


    Hey, ive got apache running on red hat 9, and i have a problem using sessions in php. The code that i use works fine on my windows box, but refuses to work on my linx box, regardless of weather i use session cookies, or URL session values. Basically, what i have done is to create a session with a varibale $logged_in, and when i check the value of this, i load the appropriate page. This works perfectly on my windows box, but wont work on my linux box - none of the session values seem to be stored. have i done anything wrong, or is there a fix for this?

  2. #2
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    Are you sure sessions are on and what version of php is it if its pre4 you have to use $HTTP_SESSION_VAR[] not $_SESSION[]

  3. #3
    Just Joined!
    Join Date
    Feb 2004
    Posts
    12
    Ive checked with phpinfo() and sessions are on. Im using the default version of php that come with RH9, thats definitlry newer than 4, i think its about 4.4.3 if i remember correctly.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    Is your browser excepting cookies this can cause a problem, And can your apache user write to php's tmp dir? thats all i can really think of.

  6. #5
    Just Joined!
    Join Date
    Feb 2004
    Posts
    12
    yep, the browser works fine, and yes, apache CAN write the sessions, so im as bamboozled as you

Posting Permissions

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