Session variables not being stored to session.save_path correctly

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jootec from Mars

    #1

    Session variables not being stored to session.save_path correctly

    For about a month now I've been ripping my hair out and cussing a lot as
    to why PHP4 running on my Win2K dev box has not been writing the
    $_SESSION variable correctly to session.save_pa th at the end of a
    certain page.

    Using print_r( $_SESSION ); showed that $_SESSION contained exactly what
    I was expecting but once it was written to session.save_pa th it showed
    an earlier state of $_SESSION in that page.

    I spent ages trying to locate the problem. I was certain PHP or my
    config was causing the problem. Why wouldn't I? after all print_r(
    $_SESSION ) was showing the correct info.

    Eventually I discovered it. I had accidently linked the src attribute on
    an image to a php file rather than a graphic file. I didn't notice the
    problem because the graphics haven't yet been created. It was good of
    PHP to tell me there was a problem in my HTML by failing to write the
    session data away properly. So if anybody has a similar problem, check
    your HTML!

    James
Working...