There are three common reasons you might get an error that looks like the following:
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:
<?phpand
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:
<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:
<?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.