Hi,
I've used zenphoto for around 4 years and continue to be grateful for the development.
Today I have tried to upgrade one of my websites to version 1.3.1.2 and it works well, except for a very strange thing.
It seems to be cutting off the end of the page code each time, at inconsistent lengths; if I refresh the page it outputs either more HTML or less HTML than before.
You can see it at
http://www.dualmonitorbackgrounds.com/testing/Any help would be great.
Comments
I don't think using the html cache plugin is an option since the pages need to be dynamic because of the "resolution preferences" option.
The page seems to load quickly for me, it's strange it would time out. After a browser refresh it only takes 2-3 seconds to load (less if we exclude image loading time). Are you sure that is the problem?
The only possible causes are
1. slow delivery of the PHP output to the client
2. PHP script failing to complete.
There is really no way to tell the difference unless the server logs show indications of #2. 2 is also not very likely since one would expect that the server would be repeatable. But perhaps there is something on the server that is at issue.
For instance it might be having slowness retrieving files from the file system, but cache recent file requests. Then it may fail the first time to deliver all the files but succeed the second because some of them were already present in its cache.
What version of Zenphoto were you running previously?
I didn't notice the problem with 1.2.9, but I can revert to that version to check if that would help so I can pinpoint which version it starts with.
Edit: Confirmed that 1.2.9 works fine, now I'll test 1.3
I've just confirmed that it first occurs with version 1.3.0.
If you have a public test site with 1.3 that might help us. Also, does the problem show in one of the distributed themes?
The problem happens with all themes.
I do have static html cache enabled but it doesn't need to be since I have excluded all pages (it was enabled in previous versions of the website and I just never disabled it), in fact I will just disable it now.
*disables it*
OK, with static html cache disabled, version 1.3.1.2 works perfectly. So I guess it's either a problem with static html cache or maybe the required syntax was changed from build 5098 to 5099?
I had the following in the plugin options input box:
`search.php/,contact.php/,image.php/,index.php/,album.php/`
In conclusion, disabling the static_html_cache plugin fixed the problem for me.
If there's any more testing you'd like me to do in order to identify why the plugin does that I would be happy to.
The static_cache_plugin requires at least php 4.3 or later (uses file_get_contents()). Before there was an fallback for older php versions but since Zenphoto recommends to use php 5.2+ at all (although not being strictly php 5) we did threw that out sometime, I think.
I haven't looked at the plugin extensively, but perhaps it would be better to call `ob_end_flush()` instead.
edit: Actually, I do not see why that line is there at all. It should not be there if the page is not cached and should not be needed if it is.
1.3.1.2 of course...;-)
Cheers