MemphiS Posted July 8, 2007 Share Posted July 8, 2007 Jul 6 23:47:49 2007] [error] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/main/public_html/index.php:2) in /home/main/public_html/index.php on line 2 [Fri Jul 6 23:47:49 2007] [error] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /home/main/public_html/index.php on line 2 Anyone know how i can reslove this issue, i had a spam bot looking for directorys and found that this error came up many times.. Nothing seems to be wrong with my code so im not to sure what i should do... Thanks for your responces Quote Link to comment https://forums.phpfreaks.com/topic/58923-error-loh-with-php-session/ Share on other sites More sharing options...
wildteen88 Posted July 8, 2007 Share Posted July 8, 2007 You have some form of output before you call session_start(). There must not be any form of output before you call session_start(). Looking at the error PHP has detected that output has started on line 2 in index.php and your session id is invalid. Post index.php here for use to look at. Make sure you post your code within code tags ( ). Quote Link to comment https://forums.phpfreaks.com/topic/58923-error-loh-with-php-session/#findComment-292407 Share on other sites More sharing options...
MemphiS Posted July 8, 2007 Author Share Posted July 8, 2007 hmm weird the onlly thing i have before session_start(); is <?php index looks like below: <?php session_start(); require_once("assets/connect.php"); /// rest of login script ?> Starts like that on index,register,lost pass all had the exact same error in the cPanel logs :-\ Quote Link to comment https://forums.phpfreaks.com/topic/58923-error-loh-with-php-session/#findComment-292409 Share on other sites More sharing options...
MemphiS Posted July 8, 2007 Author Share Posted July 8, 2007 also just to clarify no html is above that either ... Quote Link to comment https://forums.phpfreaks.com/topic/58923-error-loh-with-php-session/#findComment-292410 Share on other sites More sharing options...
wildteen88 Posted July 8, 2007 Share Posted July 8, 2007 Umm that code is fine. Looks like your PHP session is is currupt. Try clearing your cookies for your site. Does the error persist? Quote Link to comment https://forums.phpfreaks.com/topic/58923-error-loh-with-php-session/#findComment-292411 Share on other sites More sharing options...
MemphiS Posted July 8, 2007 Author Share Posted July 8, 2007 Thanks for the help wildteen.. uhm the errror doesnt persist. Ive had some search bot snooping my directory for different programs.. nothing unusal..blocked the ip of the bot.. just wanted to make sure i clear up this error to stop it coming about again.. How do i clear the cookies? Wasnt aware that servers had cookies haha :s Quote Link to comment https://forums.phpfreaks.com/topic/58923-error-loh-with-php-session/#findComment-292421 Share on other sites More sharing options...
wildteen88 Posted July 8, 2007 Share Posted July 8, 2007 No not the server clear your browsers cookies for your site - clearing any cookies set for sessions. if the problem persists have a word with your host. Quote Link to comment https://forums.phpfreaks.com/topic/58923-error-loh-with-php-session/#findComment-292449 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.