Bug in static_html_cache v1.3.1?

Every time I turn the static_html_cache plug-in on in Version 1.3.1.2 [5831] the pages get cut off before the fully load. This happens with both my theme, and with the "Default" theme, and this happens both when I am logged off and when I am logged in.

Any ideas?

Comments

  • There was another user experiencing this as well. But, since the plugin is not active when you are logged in, it is strange (and the other user did not report) that the output would be truncated then.

    For the not logged in case, look at the files in the html_cache folder. Are they complete? If so, the there is some issue delivering the output of those files. If not there is some failure in generating the pages. For the latter, search your CGI error log files and see if anything is reported.
  • adding "ob_flush();" right before the "@ob_end_clean();" in function endHTMLCache() seems to fix the problem
  • Thanks for the info. Could you tell us what version of PHP you are using? According to the documentation, this should cause a problem with the cached file roughly equivalent to what you describe.
  • I am using 5.3.3 in my testbed at home and 5.2.14 in my live site. I experienced the problem with both versions.
  • acrylian Administrator, Developer
    I will run new tests as well as I use PHP 5.3.2 locally and PHP 5.2 on my live test site. I don't remember having any issues though.
  • Like acrylian, I have never seen this problem.

    Anyway, I have made a change to the plugin for the nightly builds. Not quite the change you tried, so we would appreciate it if you can verify it works in your case.
  • The nightly build solves one problem, but introduces a new one. Now, when the cache is first created, the page is sent twice
  • What do you mean by "sent twice"? I certainly do not see any anomolies in my testing.
  • It only happens when it creates the cached file. I have set up a site where you can see it http://sandbox.eyesofvenus.com/

    This site is set up to delete the cache files as the first action index.php does to force the system to have to create the cache file each time for testing purposes, and will therefore show the issue every time.
  • Deleting line 210: "echo $pagecontent;" appears to fix the problem.
  • Well, I see what you are saying on your site. However, if I delete that line on mine I get no output. Not really sure what to do at this point. If no one else steps in and says they are having this problem I guess we are at a kind of impass. Must be some kind of configuration difference, but I have no clue as to what it could be.
  • acrylian Administrator, Developer
    I just tried and I can reproduce it as well. It seems not to happen on the index but on albums, images and Zenpage items. I found a notice that might help us:
    Notice: ob_end_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete. in ../zenphoto-svn/zp-core/zp-extensions/static_html_cache.php; on line 204

    It appears directly after the Zenphoto info comments and before the doctype of the repeated source code.

    Just to note before this change it worked well for me...
  • I've made a new try in the nightly build. See how it works for you.
  • I've made a new try in the nightly build. See how it works for you.
  • That worked perfectly! Thank you!
  • Thanks for the confirmation. Nice that we can get something that works for both of us:)
Sign In or Register to comment.