Problems with uploader_jQuery and Chrome

Hello,

I'm new in ZenPhoto community. Have setup a gallery in a large website and I'm very happy with it. I'm running Zenphoto version 1.4.4 [4d20f7093e], on CentOS 6, PHP 5.3.3.

All works fine when Using Safari but, If I switch do Chrome or Firefox, after the file upload, when I'm beeing redirected to the thumbnails page, all I get is a Blank Page.

It looks weird, because the safari and Chrome use the same webkit engine.

Anyone experiencing a similar problem? I've only activated the uploader_jQuery in the upload plugins page, and disable the other two.

Thanks for any help.

Comments

  • hello All.

    After poking around my system I've solved this issue. The blank page was appearing me in several situations, including when trying to create sub-albuns from the admin interface.

    Feeling that the action create albuns does not have any relation with the upload process, I've conclude that should be any problem related with filesystem permission. After double check, I've identified a directory with wrong permissions (read only for the http user/group) that, after fixing it, solved all problems.

    It would be nice to have a simple message in the interface saying just that - unable to save file, check permissions - or something similar, instead of a simple blank page. Of course that in the webserver logs, the filesystem errors don't give any feedback.

    This is just a headsup for someone with the same problem.
  • Unfortunately, the upload process runs in the background without any WEB interface, so any messages it might make get lost. You should always check your logs when you have blank pages. Quite often these are caused by errors that even prevent Zenphoto from being able to report anything.

    That could have been the problem in your case. What was the folder that had wrong permissions? What were the permissions.
  • Hello Sbillard,

    Thanks for your feedback. It was the Albums folder.

    The main problems has beed caused because i've uploaded the photos by SFTP that, of course, have a different user than the webserver (nginx).

    When I first created the structure and migrated the albums from the other platform, it was not an issue because in the last step i've "chown'ed" all the structure. This time, with the sftp client, I've created a sub-album, uploaded the content and forgot tho change permissions. By default, the files and directories had been created with read permission for "other", that masquerade the eminent problem. I completely forgot about write issues.

    I guess this was a quite common problem, specially when we are dealing with different users and environments in a webserver.

    I understand that this issue does not have to do with ZenPhoto itself but, it would be nice to have a headsup in the documentation when you talk about uploading directly to the server.

    keep up the good work.
  • Setup should have told you that the albums folder had the wrong permissions on that folder. In addition, there should have been errors logged in the debug log if the internal functions to move the file from the temp folder to the album folder failed. If there are none, maybe the server did not report errors from that function?
  • hello,

    yes probably... I really missed all messages in the access log.

    One question off-topic:
    These two "extetions"
    http://www.zenphoto.org/news/server-side-optimization
    http://www.zenphoto.org/news/eaccelerator-caching

    Can be applied to the Zenphoto version 1.4.4?

    I've noticed that the code in functions are different than in the post. Is it safe to apply the alterations?

    Regards,
    Jr
  • We would never recommend changing code in the Zenphoto core. As you have observed, there is a very good chance it will be changed over time so you would have a constant task of keeping it up-to-date.

    But maybe a better question would be what are you trying to accomplish. If it is simply performance on a hightly used site there are better means. In particular, we now have caching of your content so that the HTML can be delivered directly if it has already been rendered.
  • Hi,

    Thanks for your fast answer. yes, I have a very high load site, with peak values of several thousands of users in the same hour. I check my mysql processes and see lots of selects beeing made. I've already activated the static_html_cache.

    One think I remember was to disable the statistics and Image hit-count, to avoid touching the mysql. Can your confirm that this is a good idea? there's anything else I can do to avoid the load on the Mysql?

    Regards,
    Jr
  • You would have to analyze your selects to see where they originate. Certainly anything unnecessary to your site can be omitted.

    You can start by disabaling all plugins that you are not using. Beyond that, you would need to analyze your SELECT statements to find their origin. If some should be optional, you can make an issue ticket outlining your needs.
  • Thank you Sbillard.

    Right now, every image pageview, triggers the selects below. If the HTML was cached, Shouldn-t the Mysql query be avoided? I've also noticed the "watermark" beeing referenced. If i'm not using wattermark, should't the query be avoided?

    Botton line, is it possible to avoid all these queries by enabling HTML-Cache?

    Currently I have the following plugins active:
    crop_image
    deprecated-functions
    failed_access_blocker
    html_meta_tags
    legacySpam
    security-logger
    seo_cleanup
    seo_zenphoto
    sitemap-extended
    static_html_cache
    uploader_jQuery
    zenphoto_sendmail

    56 Query SELECT * FROM `zp_images` WHERE `filename` = 'arizonamountainkingsnake001.jpg' AND `albumid` = '309' LIMIT 1
    56 Query SELECT `id`, `watermark_thumb` FROM `zp_albums` WHERE `folder` LIKE 'animais' OR `folder` LIKE 'animais/cobras' OR `folder` LIKE 'animais/cobras/kingsnake'
    56 Query SELECT * FROM `zp_images` WHERE `filename` = 'hypomelanistictangerinehonduranmilksnake001.jpg' AND `albumid` = '309' LIMIT 1
    56 Query SELECT `id`, `watermark_thumb` FROM `zp_albums` WHERE `folder` LIKE 'animais' OR `folder` LIKE 'animais/cobras' OR `folder` LIKE 'animais/cobras/kingsnake'
    56 Query SELECT * FROM `zp_images` WHERE `filename` = 'albinotangerinehonduranmilksnake001.jpg' AND `albumid` = '309' LIMIT 1
    56 Query SELECT `id`, `watermark_thumb` FROM `zp_albums` WHERE `folder` LIKE 'animais' OR `folder` LIKE 'animais/cobras' OR `folder` LIKE 'animais/cobras/kingsnake'
    56 Query SELECT * FROM `zp_images` WHERE `filename` = 'albinohonduranmilksnake001.jpg' AND `albumid` = '309' LIMIT 1
    56 Query SELECT `id`, `watermark_thumb` FROM `zp_albums` WHERE `folder` LIKE 'animais' OR `folder` LIKE 'animais/cobras' OR `folder` LIKE 'animais/cobras/kingsnake'
    56 Query SELECT * FROM `zp_images` WHERE `filename` = 'anethrystichonduranmilksnake001.jpg' AND `albumid` = '309' LIMIT 1
    56 Query SELECT `id`, `watermark_thumb` FROM `zp_albums` WHERE `folder` LIKE 'animais' OR `folder` LIKE 'animais/cobras' OR `folder` LIKE 'animais/cobras/kingsnake'
    56 Query SELECT * FROM `zp_images` WHERE `filename` = 'tangerinehonduranmilksnake001.jpg' AND `albumid` = '309' LIMIT 1
    56 Query SELECT `id`, `watermark_thumb` FROM `zp_albums` WHERE `folder` LIKE 'animais' OR `folder` LIKE 'animais/cobras' OR `folder` LIKE 'animais/cobras/kingsnake'
    56 Query SELECT * FROM `zp_images` WHERE `filename` = 'bananacaliforniakingsnake001.jpg' AND `albumid` = '309' LIMIT 1
    56 Query SELECT `id`, `watermark_thumb` FROM `zp_albums` WHERE `folder` LIKE 'animais' OR `folder` LIKE 'animais/cobras' OR `folder` LIKE 'animais/cobras/kingsnake'
    56 Query SELECT * FROM `zp_images` WHERE `filename` = 'albinonelsonsmilksnake001.jpg' AND `albumid` = '309' LIMIT 1
    56 Query SELECT `id`, `watermark_thumb` FROM `zp_albums` WHERE `folder` LIKE 'animais' OR `folder` LIKE 'animais/cobras' OR `folder` LIKE 'animais/cobras/kingsnake'
  • It is not obvious where those queries are coming from, so no way to answer your questions. If you can trace them back to their source we could tell if it is possible to avoid them.

    Do you have a search form active in your theme?
Sign In or Register to comment.