Re: Can sessions be erased by a XHTML/CSS template?
Posted: Wed Sep 09, 2009 5:42 pm
I'm the developer: Let me see if I can clear this up:
In php.ini, I have session_autostart = 1. That means, I don't use session_start() anywhere in my application.
The key thing here, is that there are two copies of my application: one that has been wrapped in this template, and one that has not. The one that has been wrapped does NOT preserve sessions across even one redirect (and to clarify, there are three pages: One has the form, the 2nd does the SQL and stores the resulting recordset in a session variable, and the 3rd displays the results - I do it this way so I can show the results in pages w/o doing multiple SQL commands) I am using: header("Location:some_page.php>"); to display search results.
The copy that is NOT wrapped in the template works perfectly - only after applying the CSS does the application cease to function.
I can see the session information from BOTH applications living in /tmp on the server - so I know the backend environment is fine (sorry pytrin, you're just gonna have to accept that I'm not a novice with any part of the LAMP setup). Garbage collection, cookie lifetime.. all that stuff is fine. I have written other PHP applications for this same client, which all live in the same set of paths, and they all work w/o issue. The only difference here is the CSS/HTML content that was added after the deliverable was put in place.
It appears to me that no sessions are being erased on the server, however on the 2nd page (the one that does the SQL), doing a print_r($_SESSION) shows NOTHING.. which is wrong, because multiple values are set for demographic purposes on the page before. In addition, any session data set on page 2 is also gone when moving to page 3. And once again, the "test" copy that hasn't been "templatized" works perfectly.
Hope this helps!
In php.ini, I have session_autostart = 1. That means, I don't use session_start() anywhere in my application.
The key thing here, is that there are two copies of my application: one that has been wrapped in this template, and one that has not. The one that has been wrapped does NOT preserve sessions across even one redirect (and to clarify, there are three pages: One has the form, the 2nd does the SQL and stores the resulting recordset in a session variable, and the 3rd displays the results - I do it this way so I can show the results in pages w/o doing multiple SQL commands) I am using: header("Location:some_page.php>"); to display search results.
The copy that is NOT wrapped in the template works perfectly - only after applying the CSS does the application cease to function.
I can see the session information from BOTH applications living in /tmp on the server - so I know the backend environment is fine (sorry pytrin, you're just gonna have to accept that I'm not a novice with any part of the LAMP setup). Garbage collection, cookie lifetime.. all that stuff is fine. I have written other PHP applications for this same client, which all live in the same set of paths, and they all work w/o issue. The only difference here is the CSS/HTML content that was added after the deliverable was put in place.
It appears to me that no sessions are being erased on the server, however on the 2nd page (the one that does the SQL), doing a print_r($_SESSION) shows NOTHING.. which is wrong, because multiple values are set for demographic purposes on the page before. In addition, any session data set on page 2 is also gone when moving to page 3. And once again, the "test" copy that hasn't been "templatized" works perfectly.
Hope this helps!