PDA

View Full Version : PHP HELP!



Luke
28-02-2010, 07:16 PM
Okay, at top of index1.php I have



<?php
session_start();
mysql_connect("localhost","onefouz2_je","je");
mysql_select_db("onefouz2_je");
?>


and I'm getting this error;

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/onefouz2/public_html/index1.php:1) in /home/onefouz2/public_html/index1.php on line 2

There's no 'white spaces' anywhere - any ideas?

Thanks
Luke

Fehm
28-02-2010, 07:22 PM
It's basically telling you the session has already been begun? I think :s E.g. It's located some sort of a header elsewhere?

Luke
28-02-2010, 07:24 PM
It's basically telling you the session has already been begun? I think :s E.g. It's located some sort of a header elsewhere?

But there isn't anywhere it could've begun :S

Jam-ez
28-02-2010, 07:54 PM
Luke you have a man experienced in three years who you've worked with before on your messenger yet you trouble yourself by coming here?

Sigh... :P

LMS16
01-03-2010, 05:06 PM
Your not using sessions within tht bit of PHP so why have you put "session_start();" there :s

If you dont need it, remove it :) problem solved.

Lew.

Protege
01-03-2010, 05:12 PM
Your not using sessions within tht bit of PHP so why have you put "session_start();" there :s

If you dont need it, remove it :) problem solved.

Lew.

You never took into consideration that could be a snippet of the code... or its included into another page that requires a database connection and a session (Like a user login?).

Also, why would he request help for sessions (He was obviously stuck at this point) for you to tell him he doesnt need it, he obviously does *REMOVED*

"James."

Edited by Jamesy (Forum Super Moderator): Please do not be rude to other forum members.

LMS16
01-03-2010, 09:41 PM
You never took into consideration that could be a snippet of the code... or its included into another page that requires a database connection and a session (Like a user login?).

Also, why would he request help for sessions (He was obviously stuck at this point) for you to tell him he doesnt need it, he obviously does *REMOVED*

"James."

Edited by Jamesy (Forum Super Moderator): Please do not be rude to other forum members.

I apologise for the assumption... we all assume things lol.

Maybe he should post abit more?

Lew.

Jam-ez
02-03-2010, 04:54 PM
The problem is solved actually Protege. I didn't say he didn't need help, either, I just said it wasn't necessary for him to acclaim help here.

Anyway Luke's lazy, so I'll tell you what he told me. He no longer needs help.

Protege
02-03-2010, 07:18 PM
It wasnt even aimed at you.

Luke
02-03-2010, 09:13 PM
Sorry for any arguments caused.

There is a database.php but that's just mysql connection, nothing in there besides (no whitespace) so didn't post that.

Anyways, found a mate who's coding it for me.

Thanks.

Want to hide these adverts? Register an account for free!