abdfahim Posted July 12, 2007 Share Posted July 12, 2007 Hi, I have some questions (for php 5.2.3) 1) Is there any problem if I use Session_Start() several times in a page? 2) Is there any other variables responsible for session expire except than session_destroy() and session_gc_maxlifetime() ? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 12, 2007 Share Posted July 12, 2007 yes why would you need it? secondly sessions must be sent prior to any output being sent Quote Link to comment Share on other sites More sharing options...
abdfahim Posted July 12, 2007 Author Share Posted July 12, 2007 Ok. Then if I place if (!isset($_SESSION)) { session_start(); } muliple times is there any problem? Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 12, 2007 Share Posted July 12, 2007 why do you have to start the session over and over again? and if you dont use ob start declaring session not on the top most will cause error Quote Link to comment Share on other sites More sharing options...
abdfahim Posted July 12, 2007 Author Share Posted July 12, 2007 Well, I add those session_start() in each pages when I started php coding. Then i have to include some pages within other ones. As a result some (actually i think many) pages have multiple session_start. Now I have to do a lot to change those . And btw, I am having some problems like my sessions expired in abt 5 mins without any reason though session.gc_maxlifetime is set to deafult 1440 in my server. 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.