pdflib, sessions and headers

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
Symmetry
Forum Newbie
Posts: 2
Joined: Thu Sep 04, 2003 10:54 am
Location: Michigan, USA

pdflib, sessions and headers

Post by Symmetry »

Hi. I searched for information on this and couldn't find any except for a suggestion to use session_cache_limiter('private') which didn't help me.

Here is my problem:

I am using sessions on my pages which sends header information with the session_start() function call.

Further down on the page, I am using PDFLib functions to generate a .pdf document. Before I can output it to the browser, the document requires several header() functions to be sent such as:

header("Content-type: application/pdf");

How can I do this without getting the "headers already sent" error? Please help. Thanks, Kent
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

The first place to check would be a topic stickied to the top of this forum, Sticky: Before Post Read: Warning: Cannot add header information.
Symmetry
Forum Newbie
Posts: 2
Joined: Thu Sep 04, 2003 10:54 am
Location: Michigan, USA

Post by Symmetry »

Thanks for responding. I'll read that again.
Post Reply