First I would like to thank the developers of Zenphoto for creating this product. It is very refreshing and not bloated.
I installed Zenphoto 1.2.3 a couple of days ago. My club uses PureHost as its serving host. I took over as the club's webmaster last year and redesigned the site from the ground up. After messing with manually built photo galleries, I looked around and really liked ZenPhoto, so I decided to install it. The install didn't go as easy as I would have liked. PureHost offers PHP 4.4.8 and 5.2.5. I received fatal errors on 4.4.8, but much better results on 5.2.5. I did get warnings about setlocale() and mbstring package missing, but continued the install. I had to manually enter the database information because PureHost hosts MySQL databases on a separate server. Here is the URL to my ZP galleries (I have uploaded a few albums and photos; I have not done any theme customization yet):
http://www.sandiegomiataclub.org/galleries/Everything seems to be working fine. However, the performance is extremely slow, usually taking 20-30 seconds to load pages. I have tested it on three different networks (home, work, and AT&T 3G on iPhone), several browsers (Safari, IE6, Firefox), and Mac/Windows platforms. It seems the vast majority of that time is waiting for the server. The server is running Windows 2003, IIS, MySQL 5.0.45, and PHP 5.2.5. As noted above, the database is hosted on a different server. What should I look for to improve performance? Does the missing PHP functions (setlocale and mbstring package) affect performance? I have a trouble ticket in with PureHost, but they keep claiming the ZP pages are loading quickly.
Thanks!
Comments
I took a look at your site and this is your server that is too slow. Generally we recommend to use Apache as the server system. Hosting the database on another server should not be an issue as it does on my zenpage project site which is on shared hosting, too (link on my profile name), and that is clearly not slow. I suggest you contact your host about that.
My shared hosting service has installed a custom PHP.ini file in my home directory with the mbstring package enabled. This has helped somewhat... dropping the load time by about 5 seconds or so, but that means I'm still looking at 15-25 seconds of wait time as the server processes. They are not sure where to go from here as Apache is not an option for them. They would like to know if there is anything that can be changed server-side or ZP to make it run faster on IIS.
Other than that, I'm either looking at finding another solution besides Zenphoto (but I really like it) or moving to another hosting service that uses Apache. I am considering a move to Gallery 2 since my hosting service offers it as a one-click install, but from Gallery's own website it appears that it may be even worse on IIS than ZP. If anyone has any suggestions, I'm all ears. Thanks!
There are things I can recommend to streamline PHP performance under IIS, but they're all things the host would need to do. For example running PHP as an ISAPI module (which can be unstable, so is not preferred) can speed things up. Alternatively, the recommended way under IIS is to use FastCGI. It may simply be that the PHP server is not set up in one of these two ways.
Based on your technical knowledge (or what I can gather from what you've described) I'd really recommend finding a good host with a good Apache set up. I personally believe there's no excuse for using IIS in this day and age, it's not worth the hassle. But we will try to help you get it working well if you want to stay there.
I will inquire about FastCGI. I don't know how willing the host will be to accomodate that request. I haven't been very impressed with them so far. Their control panel is terrible and gathering information is like pulling teeth. I have to talk to tech support to find out the actual versions and status of everything, because the pages that I can access through their control panel are static and haven't been updated in several years. I would love to leave them and find another host, but that would be up to our club's board and they love to go with whatever is cheapest.
I appreciate your willingness to help. I'll be the first to admit that I'm not a guru in this arena. I actually hate scripting, but when the bosses at work say I have to, I can force SQL and VBA out of my fingertips to keep the paychecks coming. So, if need be, feel free to send me into the code for tweaks and mods... I won't like it, it'll make me grumpy and wonder why I volunteered to be the club's webmaster, but I'll be able to do it.
PHP safe mode
magic_quotes_gpc enabled
gettext() support [is not present]
setlocale() failed
mbstring package [is not present]
fatal error: Call to undefined function: filesystemtoutf8() in /frigga/home/users/web/b2298/ph.d10064180/galleries/zp-core/setup.php on line 557
The fatal error is exactly that encountered in this forum post: http://www.zenphoto.org/support/topic.php?id=4881#post-28602
After I changed to PHP 5.2.5 and ran setup again, the only warnings I received were setlocale() and mbstring package.
The PureHost tech that was helping me has been replaced by someone else who has reversed or deleted all of the tweaks that the previous tech tried, and then informed me that they find the performance adequate. Those actions tell me that I will no longer receive any server-side help in this matter. I'm not going to even try to install anything else. Now I'm going to have to battle them to get a partial refund on the MySQL cost that they charge.
Php safe mode is an major issue I guess:http://www.zenphoto.org/2008/08/installation-and-upgrading/#5
Magic_quotes is also not recommended: http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#26
gettext(); setlocale() and mbstring are actually only important if you need the translation support.
You probably really should consider to move to another host...