emvy03 Posted July 19, 2011 Share Posted July 19, 2011 Hi all, I've made a basic cms using php sessions which worked perfectly ok when testing offline, but since uploading live I'm getting this error message when ever I go to a page once logged in. Notice: A session had already been started - ignoring session_start() in /homepages/18/d374931144/htdocs/storeadmin/loginscript.php on line 2. I will the whole php script if necessary but the only code on the problematic line is: session_start(); I was thinking maybe writing an 'if' condition but I am unsure and struggling Cheers. Quote Link to comment https://forums.phpfreaks.com/topic/242383-php-sessions/ Share on other sites More sharing options...
Cineex Posted July 19, 2011 Share Posted July 19, 2011 You could do: if(!isset($_SESSION)) session_start(); Quote Link to comment https://forums.phpfreaks.com/topic/242383-php-sessions/#findComment-1244904 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.