Jump to content

session error


humski

Recommended Posts

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]<?php
include("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 You

humski
Link to comment
Share on other sites

You cant put anything before session start

[code=php:0]
<?php
session_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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.