4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 17, 2018, 11:24:06 PM

Login with username, password and session length
Search:     Advanced search
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  Error Messages / Fehlermeldungen
| | |-+  Cannot add header information - headers already sent by...
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Cannot add header information - headers already sent by...  (Read 31192 times)
Chris
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4487

Thank You
-Given: 0
-Receive: 31

Did u ever stop to think and then forget to start?


View Profile
« on: January 03, 2003, 03:22:40 AM »

There are three common reasons you might get an error that looks like the following:
Quote  [Expand]
Warning: Cannot add header information - headers already sent by
(output started at /home/sites/site57/web/membership/gallery/config.php:36)
in /home/sites/site57/web/membership/gallery/admin/admin_functions.php on line 169

1. If you have edited ANY of the 4images php files, including <language>/main.php, open all files you have edited and delete any and all characters before:
1
<?php
and after:

the very last at the end of the file. This includes trailing spaces, tabs, carriage returns, etc.

2. If you start to get this error after including a non-4images php file in the templates, the most likely cause is that the included file is trying to output a complete page to the browser which naturally includes HTTP headers.  Typical php files that do this are poll and news scripts.

One solution for this senario is to place an inline frame somewhere in your template where you want the output of the included script to appear.  The HTML code for this would look something like:
1
<iframe src="/polls/latest.php" width="150" height="450" scrolling="no" frameborder="0"></iframe>

3.  If you are trying to include php files in the 4images templates, sometimes it helps to break up the include into three lines like the following example:
1
2
3
<?php
include($_SERVER['DOCUMENT_ROOT']."/relative/path/to/my/include.php");
?>
These three lines should begin at the very left-hand side of your file with no leading spaces or tabs.
« Last Edit: June 20, 2011, 08:00:11 AM by kai » Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.043 seconds with 19 queries.