willo2k13 Posted May 3, 2007 Share Posted May 3, 2007 im trying to learn php and when i was installing openbooking i got it instaled and when i type the username and password in it just says Notice: A session had already been started - ignoring session_start() in c:\program files\easyphp1-8\www\system\session.php on line 2 does anyone know how i can get round this thanks craig Quote Link to comment https://forums.phpfreaks.com/topic/49813-session-started-php-help/ Share on other sites More sharing options...
techtheatre Posted May 3, 2007 Share Posted May 3, 2007 session_start() can only be called once (obviously if it is already started you cannot start it again). I have not used the specific application you refer to, however it is likely that you are using an include() or require() directive that contains another session_start() command or your PHP settings are such that a session is automatically started for every page. You can get some more info here: http://us.php.net/manual/en/ref.session.php#ini.session.auto-start Certainly the "short answer" is to comment out line 2 in session.php...but that is probably NOT a good idea. More likely, look at the actual page url that you have loaded (whatever your browser's address bar days when you have the error) and read the code of that php file. Comment out the session_start() line on that file so that your session.php file can hangle your entire session (i don't know what that file does exactly, but this was a guess based on teh filename). Hope this helps. Quote Link to comment https://forums.phpfreaks.com/topic/49813-session-started-php-help/#findComment-244350 Share on other sites More sharing options...
taith Posted May 3, 2007 Share Posted May 3, 2007 just change all of your session_start(); --> @session_start(); it'll supress all the errors that may give... then, sessions still active, and everybody's happy Quote Link to comment https://forums.phpfreaks.com/topic/49813-session-started-php-help/#findComment-244367 Share on other sites More sharing options...
techtheatre Posted May 4, 2007 Share Posted May 4, 2007 drat...i should have thought of that! Thanks taith... Quote Link to comment https://forums.phpfreaks.com/topic/49813-session-started-php-help/#findComment-245018 Share on other sites More sharing options...
snteran Posted May 29, 2007 Share Posted May 29, 2007 I have been having this issue forever and could never figure out how to fix. Thanks for the easy fix. I'm a newbie and I appreciate the easy fast solutions. Quote Link to comment https://forums.phpfreaks.com/topic/49813-session-started-php-help/#findComment-264279 Share on other sites More sharing options...
thegod Posted May 29, 2007 Share Posted May 29, 2007 also only put <?php before session start() no other coding or gives an error Quote Link to comment https://forums.phpfreaks.com/topic/49813-session-started-php-help/#findComment-264306 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.