View Single Post
  #6 (permalink)  
Old July 4th, 2004, 02:40 PM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Are you saying that the data isn't getting transferred between the two pages?? An undefined variable error doesn't say that. For some reason I thought you were just accessing moviesite.php directly to see what someone not logged in sees. If you have warning errors that say unable to start session.. blah blah blah then you might have a problem with retrieving your session data from the session_data directory. If the session.save_path directive was not E:\PHP1\sessiondata when you changed it you should have been having all kinds of errors. If you opened up E:\PHP1\sessiondata and your session files were there then session.save_path should have already had that value. If you did change the value of the directive you would need to apply read / write permissions to that directory too, this would have applied for your original E:\PHP\tmp directory as well.

Here's an article I wrote on permissions:
http://p2p.wrox.com/topic.asp?TOPIC_ID=11962

Secondly intializing the variable on the first page won't take care of that error on the second page if the user tries to access that page directly without being logged in. Though I understand the purpose is a simple demonstration of what sessions can do.

Quote:
quote:
I went back to php.ini and changed session.save_path to E:\PHP1\sessiondata, but this didn't make any difference. So maybe there is another directive in php.ini I should change? You may notice that sessiondata is in folder E:\PHP1, not E:\PHP (don't know how that happened, but the movie1.php seems to have found it all right).
At this point I'm having a hard time following along with what you're saying.. I need to know about all of the errors that you're seeing. You should be seeing more than undefined variable notices if data isn't getting saved. It sounds like you're doing a good job of troubleshooting.. though I don't know where you got the directory PHP1.. if this doesn't really exist your script won't work.



Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
Reply With Quote