Troubleshooting Zenphoto December 12th, 2007
- I’m having a problem installing, what should I check first?
- I have problems installing Zenphoto on Dreamhost
- When I have a problem with Zenphoto, where can I get help?
- My pictures are in /zenphoto/albums/MyAlbum but the URL says /zenphoto/MyAlbum! It’s wrong!
- What is mod_rewrite and how does it work?
- My host is 1&1, and I dont have thumbnails
- How do I enable mod_rewrite?
- I think I found a bug! What do I do?
- Someone’s asking for a PHPInfo(), what is that?
- Help! My images aren’t displaying after installation and setup!
- Why does Zenphoto make my server crash while processing images?
- I have set my Album to not published (my images to not visible) but they still show up when I view my gallery.
- I have password protected my album but I can still view it without entering the password.
- I don’t have any items in my Theme Colors (Spam Filter, Watermark) dropdown list
- When I click on “Gallery” the directory structure is shown
- I forgot my admin password, now what do I do?
- Is it possible to administrate images hosted on another server?
I’m having a problem installing, what should I check first?
Make sure you’ve:
- Downloaded files for latest zenphoto release.
- Uploaded everything to your web server (including .htaccess file in root zenphoto directory)
- Visit your gallelry. Setup will run and show you a system check status.
- Correct any issues indicated.
- Press the GO button.
- Upload the pictures you want into your albums directory, and organize them how you wish in folders and subfolders (zenphoto will currently only handle the subalbums if you’re using the subalbums testing-dev theme)
If you need more help, go to the Zenphoto Forums.
I have problems installing Zenphoto on Dreamhost
A tutorial by our user bensp: http://www.zenphoto.org/support/topic.php?id=316&replies=31
When I have a problem with Zenphoto, where can I get help?
Keep reading this page, or go straight to the Support Forums.
My pictures are in /zenphoto/albums/MyAlbum but the URL says /zenphoto/MyAlbum! It’s wrong!
No, it’s not! The URLs are correct as Zenphoto makes them. They aren’t supposed to have albums in them because they aren’t pointing to the folder! They’re rewritten by the Apache module mod_rewrite, which translates URLs into script arguments, in this case, inputs to zenphoto. Read the next question to find out how this works.
What is mod_rewrite and how does it work?
mod_rewrite is an Apache module for translating URLs. In zenphoto with mod_rewrite enabled, http://www.zenphoto.org/zenphoto/impressionists/ is the URL you see (even though the album is stored at /zenphoto/albums/impressionists on the server — the two are related, but not the same). Then, mod_rewrite translates the requested /zenphoto/impressionists into /zenphoto/index.php?album=impressionists! They’re the same! The first URL, which looks like paths to a folder, is called “pretty” or “cruft-free”, because it’s user-friendly and easy to remember. Pretty cool huh?
If you get “404 - Page Not Found” errors and images that don’t show up, you probably have told zenphoto to use mod_rewrite, but you don’t have it enabled on your server. You should set the configuration option mod_rewrite to false. Logon to Admin, click on the Options tab then the Gallery configuration tab. Uncheck the box for Enable mod_rewrite and press the save button. Or you can read the next question to see how to turn it on.
My host is 1&1, and I dont have thumbnails
You will need to open up the .htaccess file and add the following line to it if you are running php4.
AddType x-mapp-php5 .php
How do I enable mod_rewrite?
mod_rewrite is an Apache module, so it requires Apache. If you’re on a shared web host, you’ll have to e-mail them and ask for it. Most large web hosts that use Apache will have it enabled already, but yours may not, it’s not uncommon.
Secondly, you need have the correct.htaccess file in your zenphoto installation. If you have copied the one from the distribution, Setup will have updated it to your configuration. Otherwise, make sure the RewriteBase line is correct. It should be the URL to your zenphoto after the domain name. For example, the RewriteBase for http://www.zenphoto.org/zenphoto looks like RewriteBase /zenphoto .
Third, you need to make sure mod_rewrite option is enabled (see the last question.)
I think I found a bug! What do I do?
If you think you’ve found a bug, first check for a new version and upgrade if you find one. If that doesn’t fix the problem, then search for the bug, look for a similar bug, and if you still think we don’t know about it, submit a ticket! Be as thorough as possible and include your server configuration (Apache version, PHP version, etc.) and a detailed description. Also include a URL to your site, preferably the link that shows the problem. We can do a much better job of helping you if we can see what is going on.
Someone’s asking for a PHPInfo(), what is that?
PHPInfo() is a method by which you can get a HTML (browser-based) report on your version of PHP which is installed on your webserver, and also any information about installed modules relating to your ISP or webhost configuration of PHP. It provides very useful information for supporting zenphoto, as it will help us to determine vital information about your server.
This is how you can display your PHPinfo():
- Open a new text document in your favorite text editor.
- Add the following line to the document: <? phpinfo(); ?>
- Save the document as phpinfo.php and upload it to your webserver in an web-accessible location.
- Execute the document by pointing your browser to the file (e.g. http://www.yourhost.com/locationoffile/phpinfo.php
This will output a large amount of very useful information for you to peruse. You can provide this link to the support forum as a means to help us troubleshoot your configuration. You should delete the file once the issue has been resolved just to be safe.
Help! My images aren’t displaying after installation and setup!
There are a number of reasons why you photos might not display after installation and setup.
- You may need to check your permissions on your albums directory and cache directory. The permissions should be 777 to allow Zenphoto to display everything properly.
- It could be that PHP Safe Mode is enabled. Your ISP will need to help you with this configuration. You can obtain more information in the FAQ item entitled “What is PHP Safe Mode?”
- Check your .htaccess file if you’re using Apache, and make sure you have the correct path for the RewriteBase line at the top. If you’re not using Apache or it doesn’t seem to be working, reset your mod_rewrite option.
- Search the ZenphotoForums for help, or start a new topic there. Zenphoto has a very helpful community, so don’t be shy!
Why does Zenphoto make my server crash while processing images?
If you’re running a web server on a VPS or other resource-limited environment, then you might not have enough memory available to the server to process very large images. You can use the following table as a guideline to see how much memory you need available to process images of different sizes:
- VGA Image, 640 x 480 pixels => needs ~4.1 MB Memory
- SVGA Image, 800 x 600 pixels => needs ~4.8 MB Memory
- 1 MP Image, 1024 x 798 pixels => needs ~6.3 MB Memory
- 2 MP Image, 1600 x 1200 pixels => needs ~11.7 MB Memory
- 6 MP Image, 2816 x 2112 pixels => needs ~22.6 MB Memory
- 8.2 MP Image, 3571 x 2302 pixels => needs ~41.7 MB Memory
As you can see, the 8.2-Megapixel 3571×2302 image requires a very large amount of memory to process, and that’s simply because of the number of pixels. It doesn’t matter if the image is only 2 or 3 megabytes when compressed in JPEG form, or what colors the image contains or anything– it’s just how big it is, because all of those pixels have to have a place in memory while the GD library processes them. There’s no way around it!
Another problem is that browsers often make two requests per server at the same time to speed up image loading. This is perfectly normal, but if two requests for that 8-megapixel image are made and both need processing, then the memory requirement is doubled. The only way around this is to limit the number of requests your browser makes. In Firefox, this can be done by going to about:config as the URL and searching for the network.http.max-persistent-connections-per-server option and setting it to 1.
In future versions of Zenphoto, ImageMagick may be an optional image processor, which may require less memory, and at least won’t share memory with Apache.
I have set my Album to not published (my images to not visible) but they still show up when I view my gallery.
If you are logged in as the administrator all albums and images are visible so that you can edit, delete, etc. them. Log out and they should become invisible.
I have password protected my album but I can still view it without entering the password.
There are three things that might be happening here:
1. You are logged in as the administrator. Administrators are allowed to view any album, password protected or not.
2. You have logged into the album at sometime in the past. Album passwords are remembered in cookies so that vieweres do not have to log in at each page display.
3. If you are viewing an image page of a gallery that was not part of the zenphoto distribution it may not have implemented password protection. It is necessary for all image.php pages to use checkforPassword() to protect elements that you do not want displayed if the viewer has not logged in.
I don’t have any items in my Theme Colors (Spam Filter, Watermark) dropdown list
Check your CGI log. You will probably find that the PHP glob() function has been disabled. Zenphoto uses this function in multiple places. But, don’t pannic. There is a define at the front of functions.php which you can change to enable replacement code for this function. Find the line define('SAFE_GLOB', false'); in functions.php and change the false to true.
When I click on “Gallery” the directory structure is shown
Clearly the problem is that index.php isn’t set as a default file for directories under Apache (or whichever server you’re using).
If it’s Apache and you have access to your server’s main Apache config file, you need to edit your apache.conf or httpd.conf and find the DirectoryIndex line. It should read:
DirectoryIndex index.html index.htm default.html or something similar.
Change it to:
DirectoryIndex index.html index.htm default.html index.php and whichever other directory default files you want, but definitely add the index.php to that line
That should do it.
Read more here…
http://httpd.apache.org/docs/2.0/mod/mod_dir.html
or
If you have no access to the main config file, create a file called index.html (This is the file that Apache looks for (This is set up in http.conf)) and write a redirect code to point to the index.php file.
I forgot my admin password, now what do I do?
If you supplied an email address in the Admin options there should be a link on the log-on page that will email you a link to reset your password. If the link is not there, or if you don’t get the email, you need to delete some database items.
Delete the Administrators table. You may also have to delete the rows of the Option table where the name field is adminuser and adminpass if they exist in your installation. Then visit the admin page. You will be prompted to enter a new admin user name and password. Now be sure there is an email address to send the reset link the next time!
Is it possible to administrate images hosted on another server?
Zenphoto unfortunately does not support this. Zenphoto must be installed on the same server as the photos it is hosting. This is what we recommend.
Even if this was possible, it would be very slow as Zenphoto is filesystem-based and uses many filesystem operations, and doing that over a network would slow things down significantly.