Issue with static_html_cache plugin

I've uploaded the recent update of zenphoto and includes the new plugin static_html_cache. I've tried to add the plugin but it's giving me an error code and I'm not sure what I need to do. This is the error:
Warning: mkdir(/home/izabel07/rayestrada-www/brain/art/cache_html/) [function.mkdir]: Permission denied in /home/izabel07/rayestrada-www/brain/art/zp-core/plugins/static_html_cache.php on line 27
Static HTML Cache folder could not be created. Please try to create it manually via FTP with chmod 0777.
Any ideas?

Comments

  • acrylian Administrator, Developer
    Well, the error tells it. The plugin is not allowed to create a folder. Just make the folders manually or maybe ask your ISP.
  • I've added the folders manually. Still getting an error message:
    Warning: fopen(cache_html/index/index_1_en_US.html) [function.fopen]: failed to open stream: Permission denied in /home/izabel07/rayestrada-www/brain/art/zp-core/plugins/static_html_cache.php on line 110

    Warning: fputs(): supplied argument is not a valid stream resource in /home/izabel07/rayestrada-www/brain/art/zp-core/plugins/static_html_cache.php on line 111

    Warning: fclose(): supplied argument is not a valid stream resource in /home/izabel07/rayestrada-www/brain/art/zp-core/plugins/static_html_cache.php on line 112

    Is this a permissions issue?
  • acrylian Administrator, Developer
    I would think so.
  • I fixed the permissions issue, however now when I have the plugin active the admin toolbox and add tags functions are still visible on my site when I am not logged in. I've checked on other computers to verify it wasn't a cache issue.

    Any thoughts on this?
  • acrylian Administrator, Developer
    Sure, you cached the pages when you were logged in. Just clear the cache and let it redo the caching.
  • I have installed zenphoto 1.2.1, in my local system and enabled static_html_cache plugin, after enabling this plugin, hit counter is not working, please let me know, how to enable hit counter?
  • acrylian Administrator, Developer
    Turn off the static cache. The cache caches the whole page that includes of course everything on that. Sorry, currently there is no way. The cache is a very new feature.
  • Hello,

    I have enabled the static_html_cache plug-in, it is working fine, but the search page is not working(blank page).
  • acrylian Administrator, Developer
    Does that also occur if the cache is disabled?
  • Hello acrylian,

    thanks for your quick reply.

    I have disabled the "static_html_cache" in my live site, then search is working fine.

    In my local system, i'm getting the below issue in search page.

    Warning: fopen(cache_html/) [function.fopen]: failed to open stream: No such file or directory in D:\wamp\www\zenphoto\zp-core\plugins\static_html_cache.php on line 110

    Warning: fputs(): supplied argument is not a valid stream resource in D:\wamp\www\zenphoto\zp-core\plugins\static_html_cache.php on line 111

    Warning: fclose(): supplied argument is not a valid stream resource in D:\wamp\www\zenphoto\zp-core\plugins\static_html_cache.php on line 112

    thanks.
  • acrylian Administrator, Developer
    Actually the cache should exclude the search page. I will take a look at it.
  • Hi.
    In the admin panel I really would like to be able to exclude some pages chosen by myself too, like a random page for example.

    Does it make sense to you ?
  • acrylian Administrator, Developer
    You can open a ticket for that.
  • Please understand the limitations. We can tell what script is being loaded but not what the content of the script might be. So we could have an exclude list that excludes arbitrary scripts, but all instances of that script would be excluded.
  • Sure, as I'm not a php coder, I don't exactly realize that it means and needs.
    I just thought that if you can exclude the search page from the cache, the same thing could be done for other pages defined by the admin, but this is probably more complicated than I think.

    In fact, I tried this plugin which is brilliant and I found it really speeds up the gallery.
    Unfortunately, I use an image random script on my index page and activating the plugin makes it always the same so I can't use it out of the box.

    I'd like to understand how does it work.
    Are the cached pages regularly updated ? How often ?

    Thank you for your time.
  • acrylian Administrator, Developer
    What sbillard actually meant is that we are not able to exclude parts of a page (=script). Either the whole page is cached or not. You can of course modify the plugin to exclude your index.php. The check for index.php is in line 154-157. Commenting that out would probably help.

    You can set the cache timeout on the cache's plugin options. Default is one day.
  • I'll try.
    Thank you so much !
Sign In or Register to comment.