WARNING: Cannot modify header information - headers already sent by

Hi,

I wonder if someone could help me.

We're running an old Zenphoto system v1.4.3.1. This is a highly customized version that we can't upgrade.

The last few days when I visit our gallery the admin toolbox does not appear.

Checking the logs I am seeing this which appears to be the reason.

{Wed, 27 May 2015 08:59:50 GMT} Zenphoto v1.4.3.1[10590]
Backtrace: WARNING: Cannot modify header information - headers already sent by (output started at /home/spoilert/public_html/images.spoilertv.com/zp-core/admin-functions.php:1) in /home/spoilert/public_html/images.spoilertv.com/zp-core/admin-functions.php on line 109
header called
from printAdminHeader (admin-functions.php [109])
from admin-logs.php [65]
{Wed, 27 May 2015 08:59:50 GMT}
Backtrace: WARNING: Cannot modify header information - headers already sent by (output started at /home/spoilert/public_html/images.spoilertv.com/zp-core/admin-functions.php:1) in /home/spoilert/public_html/images.spoilertv.com/zp-core/admin-functions.php on line 110
header called
from printAdminHeader (admin-functions.php [110])
from admin-logs.php [65]

I've checked the files and the lines of code that it seems to relate to are these.

header('Last-Modified: ' . ZP_LAST_MODIFIED);
header('Content-Type: text/html; charset=' . LOCAL_CHARSET);

Anyone have any pointers or things I should be looking for?

We've not knowingly changed any files.

Comments

  • acrylian Administrator, Developer
    We're running an old Zenphoto system v1.4.3.1. This is a highly customized version that we can't upgrade.
    You mean the core customized? I won't repeat why you shouldn't have done this ;-)

    It is virtually impossible to tell you what is causing this. It is usually a follow up error on other errors outputting messages before said headers are send. You need to find that error.
  • darkufo Member
    Ah cool, so this is likely the result of another earlier error that I need to look for.

    That helps actually as I was looking at why these core php would suddenly have stopped working. It's likely we've borked something in one of our non-core php files.

    Thanks for the tip
  • acrylian Administrator, Developer
    Not necessarily an "error" that is logged. It could just be a function that puts out something to early (left over from debugging or whatever). Try to cause the error and look at the generated source code.
Sign In or Register to comment.