Troubleshooting Zenphoto Mar 02, 2009 / Updated: May 18, 2013
- 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 are some thumbnails/sized images not generated? 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?
- Why does deleting of an album via the admin interface fail?
- Why does Zenphoto not show a thumbnail from my video?
- The number of thumbnails on my theme's album view does not match my setting
- I have just installed version 1.1.7 and I cannot change the language
- Is it really necessary to pre-cache my images at all?
- Is there any limit to the number of images?
- I am having difficulties with zenphoto language translations.
- Some of my Images aren't loading and/or pre-cache doesn't work.
- What is magic_quotes_gpc and why should it be disabled?
- I am having probems with album sorting?
- I am having probems albums (images) witth accented characters in their names?
- Setting permissions for Zenphoto files and folders
- Is it possible to remove the filename extension from image names in the URL?
- I did enable a plugin but why I don't see anything of its features on my gallery?
- Can I integrate Zenphoto with Wordpress or another CMS?
- Can I extend the functionality of Zenphoto myself?
- Does Zenphoto work with PHP Safe Mode?
- Is it possible to configure TinyMCE differently?
- I have moved my zenphoto installation on my server and now all urls are wrong!
- I have enabled comments on the gallery options and for each image and album but there is no comment form showing up on my theme!
- Is it possible to manage youtube videos (or from another portal)?
- How to protect my images from hotlinking?
- How to move my installation to a new server?
- Can I just use specific files of a nightly build or svn version to fix a problem in a stable release?
- I have problems installing or upgrading using SimpleScripts
- How do I disable the right click button to protect my image against downloading?
- Why is the image rotate button grayed out?
- How not to show albums on the gallery and/or password protect albums (as well as other Zenphoto items)
- I am having problems logging into the Zenphoto administrative pages
- The colors of my images are wrong
- How and what does Zenphoto cache?
- How to move, copy or rename albums or images without loosing title, descriptions, tags etc.?
- How to setup anonymous uploads by unregistered users?
- How to create custom TinyMCE configurations
- Where to upload images etc. via FTP?
- I'm getting error reports that some function is deprecated.
- 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.
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.
AddType x-mapp-php5 .php
LoadModule rewrite_module modules/mod_rewrite.so
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.)
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.
- You may need to check your permissions on your albums directory and cache directory. Read here about the correct settings.
- 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 are some of my thumbnails/sized images not generated? Why does Zenphoto make my server crash while processing images?
- 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 3571x2302 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.
Since Zenphoto 1.3 you could also switch to Imagick (ImageMagick) which may require less memory, and at least won't share memory with Apache. If your server supports this you can enable it via a checkbox on Options > Image.
I have set my Album to not published (my images to not visible) but they still show up when I view my gallery.
- You are logged in as the administrator. Administrators are allowed to view any album, password protected or not.
- 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.
- 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.
define('SAFE_GLOB', false');in functions.php and change the
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...
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.
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.
But you can do it manually: Make a screenshot from your movie and put the image named as the movie (for example: movie named movie.flv, image named movie.jpg — lower case suffixes are required!) into the album folder where your movie is located.
query("INSERT INTO " . prefix('options') . " (name, value, ownerid) VALUES ('locale','en_US', 0)");
place this file in your zp-core folder then browse to it. Once the script has run you will be able to change to the language of your choice. This problem is also corrected in the nightly builds.
Better to leave them be, let the gallery work as it is, and process them when they're first requested. For users, this will mean a very slight delay the first time an image is *ever* viewed, and absolutely none after that. This is how Zenphoto is designed to work, and we think how it works best. No need to pre-cache anything, just quit worrying about the initial lag from the first processing, it only happens once.
Zenphoto should be able to handle any number of images in the entire gallery ”“ it will help greatly with performance if they are separated into smaller albums. Even then, single albums with 2000+ photos are possible and will still be usable.
If you're having trouble with the speed of large galleries, try using the static_html_cache plugin to cache Zenphoto pages. Frequently loaded pages will be much faster.
- There is no language selection for my desiered language.
Zenphoto relies on volunteers to translate each release. We have a large number of dedicated individuals making translations. There may be a translation for your language which was not avaiable in time for the zenphoto release. You can check by reviewing the language tickets on TRAC. If you language does not have a ticket, consider volunteering to produce it. For details see our translation tutorial.
- There are phrases which are displayed in English even though I have selected a different language.
Zenphoto is an ever evolving software. We will occasionally include a translation that is not 100% complete feeling that something is better than nothing. Check the language tickets on TRAC to see if there is an update for your language. If that does not resolve the issue, post a note on the ticket indicating what revision of zenphoto your are running and phrases which are displaying in English. (It will also help if you indicate where you see them, eg. the Stopdesign image page, the admin theme tab.)
- When I select my language I get an error saying that the locale is not supported on my server.
Language support requires two capabilities in addition to #1 above. First the server running your site must have support installed for the locale associated with your language. (See #4 for the second capability.) If you are getting an error when selecting a language saying that it is not supported on the server you will have to contact your provider to get the server updated with the necessary language support. You can get a list of locales your server supports by running the list_locales script. For further information on locales see Controlling your locale with environment variables and Locales mini-HOWTO.You can also look at the output of the list_locales script to see if there is an alternative language that fits your needs. For instance, if Zenphoto supplies a Spanish (Latin America) tranlsation But your server does not support it. Maybe your server supports Spanish (Bolivia). You could rename the es_LA folder to es_BO and get the translations.
- Even though support for my language exists, I am getting only English text.
Zenphoto uses a PHP feature named gettext() to support translations. If you are getting a notice from setup.php that PHP gettext() support is not installed all text will be displayed in English no matter which language you have selected. We hope in the future to have a replacement library to provide translations for installations with no gettext() support. Until then you will have to arrange with your ISP for gettext to be installed.
- I have selected HTTP Accept Language on the admin gallery configuration tab but I am not seeing text in my language.
Your browser must specify your preferred language. To see what is being reported as your preferred languages run the list_locales script. (Also see #3 and #4 above.
Warning This feature has been DEPRECATED and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.
magic_quotes_gpc is an early functionality of PHP that was ill-conceived and has been a great burden to developers, as well as end users ever since it's inception. It encourages sloppy code and consumes valuable resources when it is enabled.
You can disable magic_quotes_gpc by editing your PHP.ini file. Change the line
magic_quotes_gpc = Onto
magic_quotes_gpc = OffYou can also disable magic_quotes_gpc in your zenphoto .htaccess file by adding the line
php_value magic_quotes_gpc offPlease contact your hosting provider for further assistance.
The technical explaination is that zenphoto stores its data in UTF-8 format in the database. But your files ystem probably uses some other character set, most likely ISO-8859-1. So when zenphoto gets the name of the image (filename) or the album (folder name) the character set of that string will not be UTF-8. This is OK so long as the string also does not contain any characters which are invalid in UTF-8. Unfortunately many accented characters from ISO-8859-1 are not valid when interpreted in UTF-8 so when the string is stored into the database MySQL truncates it at the first non UTF-8 character.
Current versions of Zenphoto will handle conversion of file system character strings to UTF-8 representation. However Zenphoto assumes that the filesystem characterset is ISO-8859-1, so if yours is in some other character set, things still will not work. Another player in this drama is the character set assumed for Image URIs. Most servers seem to use ISO-859-1 even though the page claims to be in UTF-8. If your server actually assumes UTF-8 for these, you need to change the UTF8 image URIs option on the gallary configuration tab.
Ideally, permissions should be set up with 0644 files/0755 directories ([rw-r--r--] files and [rwxr-xr-x] directories) permissions, with [youruser:webservergroup] ownership. If you can do that, we highly recommend it. The idea is basically to keep ownership of the files yourself, give group access to the web server, and shut everyone else out.
Some servers are configured so that scripts cannot be executed from folders with weak permissions. We suggest you start with the strictest permissions and relax them if that causes permissions errors. Unfortunately, there are many permutations of how servers can be configured and not all are reasonable or rational. You may have to experiment to see what works for your situation.
NOTE: As from Zenphoto release 1.2.4 you can alter these defaults from the setup program. See the Strict Permissions entry. Starting with release 1.2.7 Setup will attempt to modify the permissions on its files and folders. However, if it is unable to do this you will have to manage the permissions manually.
This means you have to add some of them to your theme files yourself. This is generally very easy as it is mostly just adding one extra function where you want the plugin's feature to be visible. Please refer to these text to learn how to do that:
- Match the look of your Zenphoto site to your existing CMS site is to create a Zenphoto theme using the CSS and HTML from your site's theme.
- Technically more advanced is zenphoto as a "plugin".
- For Wordpress specifially there are techniques available collected here : http://www.zenphoto.org/2009/11/integrating-zenphoto-into-wordpress-tutorials/
Also please review our theming tutorial. For Wordpress specifially there are some Wordpress tools available.
Or maybe you want to run your entire site with Zenphoto using the CMS plugin Zenpage.
Zenphoto is open source, so you can modify its core directly. Bear in mind code changes to the core Zenphoto code may make upgrading difficult later on, and generally hacks have little or no support.
1.0.8 and above should now be compatible with PHP safe mode. If any problems occur in a safe_mode configuration, please report a New Ticket describing the problem.
There may still be problems uploading using the administrator's interface while in safe_mode. This problem is not possible to fix, as in safe_mode it is impossible to both create a folder and write to that folder using the web server alone. You may only upload to existing folders that you've created using FTP upload. To get around this, we recommend you upload via FTP, or create the folders you want using FTP, and also ask your host to turn off safe mode as noted above.
You need to do the same if you want to keep Zenphoto within a subfolder but would like to rename it to /gallery for example.
I have enabled comments on the gallery options and for each image and album but there is no comment form showing up on my theme!
- Enable the class-textobject plugin on the backend plugins page.
- Upload a plain text file (.txt) with code to embed a specifc (video) file via ftp or the backend.
- To use an thumbnail besides the default one follow the same instructions as for video thumbnails.
- That's all.
You can change the location for your albums by modifying the zp-config.php file. There is comentary in the file that will guide you in making such a change. Please carefully note the comments, specially for "external" album folders. Also note that server filesystem permissions settings may prevent you from making these changes.
So, to really protect your images from hotlinking you need to use .htaccess (if you server supports this). Here is a little generator tool for this: http://www.htaccesstools.com/hotlink-protection/. We additionally have prepared a template htaccess file you could adjust.
- Install Zenphoto on the new server. Make sure it is the same release version as the old install. Do not run setup yet.
- Copy all customized themes or plugins from the old to the new location.
- Copy the albums and the cache folder from the old to the new location and if you used Zenpage also the uploaded folder.
- Export the database using the database backup tool on the admin overview page of the old install.
- Copy the backup folder with its content to the root of your new installation.
Now run setup (zp-core/setup.php). It will provide the option to import that database backup when you have to set your user/password details.
- Now access your site/admin backend and everything should be as usual.
Can I just use specific files of a nightly build or svn version to fix a problem in a stable release?
There are frequent reports that especially upgrades are often not working as expected. A user has provided some instructions on this forum thread.
We recommend to do a manual install as described on our installation page.
The first part of this question is easily answered. There are many java scripts available to disable this action. Unfortunately, the second part of the question is not addressed by the first. The right click/save target as context menu is only one of a myriad of ways that someone can capture web content.
There is a very good discussion of this on about.com. But, just in case this link goes away without us noticing, I will summarize what it tells you.
- Disabling the context menu (what right click takes you to) is very annoying to people used to using the context menu for web browsing. Disabling it may turn people away from your site in disgust.
- Disabling the context menu does not prevent capture of web content, it only prevents one small method of doing so.
So, if you wish to protect your images you need to take a different tact. Some suggestions are:
- Watermark your image. Zenphoto provides a means to do this.
- Upload only small, WEB quality images. These images may be captured, but will be useful only for WEB pages.
- Imbeed copyright information in the image — both in the metadata and with steganalysis.
How not to show albums on the gallery and/or password protect albums correctly (as well as other Zenphoto items)
- Published/not password protected: Any one can see these items
- Not published/not password protected: People have to "know about" these items to view them. (That is they need to know the URL.)
- Published/password protected: People will know of these items but not be able to access them without the password.
- Not published/password protected: These are truely restricted to "logged in users"
This is also the same for Zenpage pages and news articles/categories (passwords for categories only).
define('DEBUG_LOGIN', false); // set to true to log admin saves and login attemptsChange false to true and save the file. Now drop your administrator's table as described in the referenced troubleshooting article. Delete any debug_log.txt file in your zp-data folder. Run setup, create a new user/password, then attempt to log in. A new debug log will be created containing infromation the developers will need to troubleshoot your problem.
Second, there are two aspects of color space. The first is the RGB values of the pixels. Then there is a color profile which may be associated with an image. So you can have pixels which are sRGB or adobeRGB or some other "color space". If the pixels are not sRGB then typically the web programs will not display the color correctly. If they are, then things should be fine.
Zenphoto does resizing of images with image processing libaries that are installed on your server. Zenphoto supports two of them:
- GDlibary: This is the default libary which is most commonly availabe on servers. GD does NOT support or preserve color profiles embeded in images.
- Imagick libary (since 1.3): This is capable to preserve color profiles (due to a bug it is not in Zenphoto 1.3.1 yet) but the recommendation to use sRGB still persists.
Also beware that the commonly used "export to web" feature of some well know image processing tools generally does strip meta data including color profiles from image to achieve smaller file sizes.
- Image cache: Zenphoto does not touch the original images you uploaded to the albums directory. But it does cache the resized images like thumbs, sized images or any other sized images so they don't have to be generated any time again. Zenphoto creates these cached files on the fly. This means they are not preliminary created but on request, e.g. if someone visits a page of your site. Depending on teh dimensions of your images and your server's power this might result in an initial delay once.Those images are stored in the root /cache folder. You can clear this cache manually on the backend. It is for obvious reasons not possible to delete this cache. However if your images uploaded are the same size as used for the single sized image they will not be generated.Note Zenhoto can't create thumbs from multimedia files.
- RSS cache: Zenphoto caches the rss feeds provided as static .xml files in the root /cache_html/rss/ folder. This can of course be disabled via an option.
- Static HTML cache: Optionally there is also the included static_html_cache plugin that caches all pages as static .html files in the same /cache_html. If you use the multilingual option a page for each language is generated automatically. Note that the cachce needs to be cleared if you change anything and want to to appear before the expire date set, it is not autocleared when saving an update.
- Sitemap cache:If you have eenabled the sitemap-extended plugin the sitemap is cached in /cache_html/sitemap as a static xml file as well. You can of course also disable this cache via the plugin's options.
- Info embeded via image meta data (EXIF/XMP):
This is the way we recommend. On uploading Zenphoto will read this data and add it to the database. If you you now move, copy or rename image files via FTP the data will travel with the images as it is embeded in them. However the images will be recognized as new even if their data travels with them.
- Info added to the database on the backend:
If you have not embeded the data in the images and move, copy or rename them via FTP the data will be lost. If you want to avoid this you have to use the tools for "move, copy, rename" you find on right side on each image's entry on the backend edit pages. Then the data of the database is moved as well.
- Info embeded via image meta data (EXIF/XMP):
On the file system albums are just folders. Folders can't have meta data so on moving, copying or renaming a folder all of the info entered to the database on the backend will be lost. This counts of course also to its images except you have embeded their info. If you want to avoid this you have to use the tools for "move, copy, rename" you find on right side on each album's entry on the backend edit pages. Then the data of the database is moved as well.
If you really want to do this, setup an "unpublished, protected" album . (Or leave the album published, but set the default for albums and images images to be unpublished.) Create an anonymous FTP account that allows write only access to this album folder.
Then your anonymous guests can FTP files and folders to with that account until your server chokes with too much traffic or your disk is filled to the brim. You can view this folder and publish/move images you want to approve.
- Create in the root plugins folder a new folder called tiny_mce
- Inside the new tiny_mce folder create a new folder called config
- Go to zp-core/zp-extensions/tiny_mce/config and copy any or all of the existing config files to get you started.
- Place the copied files in your new /plugins/tiny_mce/config/ folder
- Rename your copied config file(s) to something unique for each file, e.g. add a prefix like my or anything else you wish to use.
- Make any further edits you wish to make within the config file.
- If you want to use your own CSS file for the editor add a new line after the last theme_advanced_**** item and enter
content_css : "/themes/yourthemename/content.css", <- make sure you have the comma at the end.
- Create your own content.css file in your theme folder or copy one of the tiny_mce theme css files located in
/zp-core/zp-extensions/tiny_mce/themes/advanced/skins/default and place that in your theme folder and then edit it to your desired requirements and styles.
- Upload the new tiny_mce folder (and its contents) in the plugins directory and your new theme content.css file to your zenphoto site.
- Login to your zenphoto admin and go to Options, Plugins, Tiny_mce and then select from the drop down selects your new tiny_mce config files and apply (save).
Your tiny_mce editor for your articles etc should now be working and using your own config files and content.css file.
For more information of config options for tiny_mce go to http://tinymce.moxiecode.com/ and have a look at some of the examples to see what you can do.
occasionally find we need to change the way something has worked in the past.
Thus we may make some theme functions obsolete. When this happens we try to
maintain the old function name to keep un-migrated themes working. But we move
these functions to a plugin named deprecated-functions so that sites which are
up-to-date do not have the overhead of having them loaded each page refresh.
function so that you will know your theme needs to be updated. Generally this notification
will explain the update need is. These messages can be annoying once you know
that theme modification is needed. So, the plugin also has options that let you
disable the message on those functions that you recognize need replacing.
Disable the message and your theme will work as it did in the prior release.
the plugin may not survive the test of time. There will be no attempt to keep
these functions working as Zenphoto matures. If you get these deprecated
function notifications, upgrade your theme at your earliest convenience.
This work by www.zenphoto.org is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.