Session Error...?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
bonkers
New php-forum User
New php-forum User
Posts: 46
Joined: Wed Mar 12, 2003 7:17 pm

Session Error...?

Post by bonkers » Sat Jun 07, 2003 9:00 pm

I'm having problem with sessions, does anyone know of a very descriptive tutorial? I get these errors trying to start sessions, yet there are no "header()" functions being called.

Code: Select all

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/cso/webspace/templates/functions.php:41) in /home/cso/webspace/user_login.php on line 19

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/cso/webspace/templates/functions.php:41) in /home/cso/webspace/user_login.php on line 19

Warning: Cannot modify header information - headers already sent by (output started at /home/cso/webspace/templates/functions.php:41) in /home/cso/webspace/user_login.php on line 22

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Post by bezmond » Sat Jun 07, 2003 11:53 pm

any session info MUST be placed BEFORE any information is sent to the users web browser.

Your error says that something is being sent to the browser on line 41 of "functions.php" - this will cause an error with sessions unless the session comes before this information...

Regards,
Andrew

bonkers
New php-forum User
New php-forum User
Posts: 46
Joined: Wed Mar 12, 2003 7:17 pm

Post by bonkers » Sun Jun 08, 2003 8:17 am

OH... oops...yea it's at the bottom... It's the same deal with header() huh?

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Post by bezmond » Sun Jun 08, 2003 8:46 am

yep

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests