codexx Posted July 24, 2007 Share Posted July 24, 2007 Hey Everyone. We just moved a script to a clients server. We developed in PHP 4 and everything worked fine. The clients server is PHP 5. Sessions work perfect when its in the main public_html directory. When a user goes to a folder ie oursite.com/folder/ the session is no longer there. Is there any changes in the versions that would cause a session to no longer be valid when you enter a folder? Ex. User logins on login.php and can view index.php and additional pages requiring authetication. User clicks on myAccount and is taken to oursite.com/users and gets redirected to login.php because the session is no longer available. The script worked fine before the move. Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 24, 2007 Share Posted July 24, 2007 be sure you have session start in every page of your site Quote Link to comment Share on other sites More sharing options...
codexx Posted July 24, 2007 Author Share Posted July 24, 2007 We do, it all worked fine before. It was the change to the new servers version that has made it a little weird. Is there anywhere I can go to see the changes to the session in PHP 5? Is there anything in php.ini that could cause it to fail? The base of the URL is the same ie (http://www.oursite.com) the only factor changing is the /folder so I don't see why it isn't recognizing the session data. Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 24, 2007 Share Posted July 24, 2007 maybe you can take a look at this page http://www.php.net/manual/en/ref.session.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.