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() ? Link to comment https://forums.phpfreaks.com/topic/59586-muliple-session_start/ 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 Link to comment https://forums.phpfreaks.com/topic/59586-muliple-session_start/#findComment-296067 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? Link to comment https://forums.phpfreaks.com/topic/59586-muliple-session_start/#findComment-296072 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 Link to comment https://forums.phpfreaks.com/topic/59586-muliple-session_start/#findComment-296077 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. Link to comment https://forums.phpfreaks.com/topic/59586-muliple-session_start/#findComment-296092 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.