Opened 17 years ago

Closed 14 years ago

#360 closed Defect (worksforme)

PHP headers already sent

Reported by: AlphaLaser Owned by: Rytis
Priority: Trivial Milestone: Undetermined
Component: Web - Project Version:
Keywords: php header Cc:

Description

Sometimes the page header and footer is output twice if error_page() is called after page_head() was already called previously. This also results in a benign "headers already sent" error from PHP, since the default page_head() sends Content-Type headers. The problem can be seen in this page:

http://setiathome.berkeley.edu/forum_forum.php?id=10&start=10450

Apparently a foreign key inconsistency is causing it. Something that stops execution of page_head() and page_tail_aux() more than once could fix it (in the same fashion as HEADER_H defines in C), though I'd imagine that an existing project that's implementing their own versions these functions would have to fix it themselves, and it might be too trivial to bother.

Attachments (1)

forum_forum.htm (22.7 KB) - added by AlphaLaser 17 years ago.
In case the example link changes, this is the copy of the HTML output

Download all attachments as: .zip

Change History (2)

Changed 17 years ago by AlphaLaser

Attachment: forum_forum.htm added

In case the example link changes, this is the copy of the HTML output

comment:1 Changed 14 years ago by Christian Beer

Resolution: worksforme
Status: newclosed

Closed because of age of Bug. I consider this fixed in the meantime.

Note: See TracTickets for help on using tickets.