humski Posted August 15, 2006 Share Posted August 15, 2006 hey guys, i recently signup to pay for my own share hosting, and already with my login file, i loaded it up and i get this error on top of my site. [code]Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/utvsoyhd/public_html/game.php:7) in /home/utvsoyhd/public_html/game.php on line 9[/code]and this was the codes [code]<?phpinclude("conf/config.php");session_start();session_register( "session" );?>[/code]It's funny, because when i was still using it on free hosting service, no such error appeared. Could this have anything to do with server in cpanel? if so please help me set this out.Thank Youhumski Quote Link to comment Share on other sites More sharing options...
Jenk Posted August 15, 2006 Share Posted August 15, 2006 [code=php:0]session_start();[/code] must be called before there is _any_ output sent to the user agent. Check for other error messages/notices and for any unwanted whitespace outside of [code=php:0]<?php ?>[/code] tags. Quote Link to comment Share on other sites More sharing options...
sanfly Posted August 15, 2006 Share Posted August 15, 2006 You cant put anything before session start[code=php:0]<?phpsession_start();session_register( "session" );include("conf/config.php");?>[/code]Try reading the [url=http://www.phpfreaks.com/forums/index.php/topic,31047.0.html]PHP FAQs[/url] before posting 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.