upgraded to 1.9 now getting "Warning: Cannot modify header information" error

Hi all,

I just upgraded to 1.9 folowing the instructions and I have an issue,

I am now getting an error across my index page saying: "Warning: Cannot modify header information - headers already sent by..."

It can be seen here: http://www.mygreatwallpaper.com/gallery

I have also now realised that static_html caching is no longer working even when enabled and is not creating cache pages and is not purging when the button is pressed.

Is this error to do with this plugin and how can I get rid of this issue?

Thanks,

Darren

Comments

  • ok it appears only i get this error when I'm logged in as admin.

    It also appears by reviewing the html files that cache is not created by me when I'm logged in as admin, however if I log out a cache file of the index is successfully created.

    I can see all this via FTP, the pruge html cache button etc does hnothing, it's as if the plugin does not work, yet still continues to happily create and use the cache files (provided you're not logged in).

    Does that help at all?

    Does this indicate that something that is loaded as part of the admin panel is conflicting with the caching plugin?
  • acrylian Administrator, Developer
    No, check the permissions on your files and folders. Did setup report anything?. And better post full errors. WHich file does it refer to?
    We don't know anything about your theme of course. You should really look into your server error log as there is surely an error.

    Regarding html cache, of course this is disabled if logged in. Otherwise it would cache your password protected or unpublished albums so that anyone could see them. Regarding the button not working, see my first comment.
  • acrylian Administrator, Developer
    Btw, where did you get version 1.9? We are just at 1.3..;-)
  • damn, I meant 1.3 throughout. Work in web and have been runnign 1.9 of a site I'm developing.

    full error is:

    Warning: Cannot modify header information - headers already sent by (output started at /home/greatwal/public_html/gallery/themes/mgw/index.php:3) in /home/greatwal/public_html/gallery/themes/mgw/index.php on line 3

    Line 3 is:

    <?php header('Last-Modified: ' . gmdate('D, d M Y H:i:s').' GMT'); ?>

    Has this line from the previous version of themes been replaced with something else? and why would the error only show when logged in as Admin?

    Didn't get any issue during setup regarding themes expect some that stated out of variance, but then I use a custom theme and so didn't pload all of the originals.

    Regarding button not working surely this cannot be due to custom theme? as its in admin panel, for upgrade i simply replaced the zp-core and root files as stated.

    cache_html has 755 permission which is what it was before.

    Any of that help? And i suppose that makes sense regarding caching, doh!
  • ok by removing that line the error goes away, and by reviewing the difference between logged in and not logged in source it doesn't appear to have lost anything from the header.

    Can you confirm if that line is or is not needed?

    Also regarding the purge button, it's not the end of the world as i would usually purge just the html files I need to through ftp rather than every single page but what folders would need specific permissions that i could check for that to work.

    I hate having buggy upgraded software and would rather have it all sweet.

    Thanks Acrylian.
  • acrylian Administrator, Developer
    That header() line is in all standard themes and for quite some time. If it works with the standard themes something is in your theme. So best is always to test standard themes first if issues occur.

    Anyway, it is not required actually and should just prevent some browsers' caches from being too persistent.
  • ok well i did a big compare and cleaned up the code while i was at it, and it appears it could have been a whiespace issue which was causing the error, so problem soved, it was my theme.

    Now to my final issue, the purge html button bug, shall i just live with it or is there anything you can recommend?
  • acrylian Administrator, Developer
    Ok, that happens..;-)

    Regarding the html cache, I have to check myself. Sure, that the cache_html folder has the right permissions? I don't think we have change anything on that plugin since 1.2.9 (but I don't remember exactly).
  • The PHP notice on the Purge HTML Cache button has been fixed in the nightly. (I assume this is what you mentioned.) http://www.zenphoto.org/trac/ticket/1520
Sign In or Register to comment.