sessions and output buffering...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
LonelyProgrammer
Forum Contributor
Posts: 108
Joined: Sun Oct 12, 2003 7:10 am

sessions and output buffering...

Post by LonelyProgrammer »

Hi all...

I have problem with PHP pages that uses ob_start() and start_session() on the same page. The session is created okay (I checked the session directy), but when I move over to another page, start_session() will create a new session instead of resuming the one created earlier. (When I access the second page, a new session with 0KB is created. I verifiy that PHP is trying to access that session, instead of the previously-created one, by matching the session id).

Disable output buffering, and my session works fine. Anyone have any advice as to how could I get sessions and output buffering working together?

Any help will be appreciated!
Thanks in advance.
Post Reply