session error

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Post by Redcircle » Wed Apr 02, 2003 5:21 pm

something is being sent to the browser before the session cookie is created.

Make sure there are no spaces before the first <?php

Osaou
New php-forum User
New php-forum User
Posts: 7
Joined: Tue Apr 15, 2003 4:52 pm
Location: Stockholm, Sweden
Contact:

Post by Osaou » Tue Apr 15, 2003 5:09 pm

Or, take use of this nifty function:

Code: Select all

ob_start();

It prevents the compiler to flush (send it to the user) parsed info directly...
This way it's only sent when the buffer reaches its limit, at the end of the page, or when you command it to... =)
Meaning you can use functions such as session_start() or header() when html-material already has been sent...

/Osaou

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest