PDA

View Full Version : Session cookie errors in php


xbllizzdx
08-13-2006, 11:37 PM
Why do i get these errors when i go to my website.

http://img205.imageshack.us/img205/9990/65wx3.th.png (http://img205.imageshack.us/my.php?image=65wx3.png)

Tyler
08-14-2006, 02:54 AM
Thats a script error, contact the makers of the script. It basically means that one file started the page and another is trying to start the page again.

xbllizzdx
08-14-2006, 02:57 AM
Thats a script error, contact the makers of the script. It basically means that one file started the page and another is trying to start the page again.

Acually the script is made from scratch by me, and it works fine on this other host.

I have got this error on other scripts i have used to.

Tyler
08-14-2006, 03:03 AM
Well I am not sure why that script works anywhere, but make sure you only have one session start function then it should work.

arenlor
08-14-2006, 04:47 AM
AH!!! Headers already sent! you have to declare session_start before you output anything else, so at the very top of the page just put in <?php session_start(); ?> before you declare HTML even, very first thing, session_start(); I had this problem myself before, it took about eight hours to figure out what, and a bout of cussing or two.

UnlimitedMB
08-15-2006, 06:50 PM
Probably your old host just had error display turned off so you did not know of the problem.

You need to start the session before using set_cookie() or header() or print/echo.

Also make sure the very first line of your script starts with <?php and not an empty line.