Installation problems

    Notes about deprecated functions

    In the process of adding features and improving Zenphoto we occasionally find we need to change the way something 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. This plugin will cause an error notification upon use of the function so that you will know your theme needs to be updated. Generally this notification will explain what needs to be updated.

    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. But NOTE: The implementation of the replacement functions in 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.

    Problems installing on certain hosts


    If you don't 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
    For further issues please take a look at this tutorial:


    A tutorial by our user bensp:

    Problems installing or upgrading using SimpleScripts or other install helpers

    We don't support using installtion helper scripts like SimpleScripts and we don't know what these are doing. If you have problems please ask the creators of SimpleScripts or your host. There are frequent reports that especially upgrades are often not working as expected.

    We recommend to do a manual install as described on our installation page.

    Getting 500 error on accessing the site

    There are several possibilities for this error.

    1. Mod rewrite may not work on your installation. Correct this by un-checking the mod rewrite checkbox on the General options tab, URL options.
    2. There may be file permissions issues on your site. Some servers are configured not to allow scripts to run if the script file security is too loose. Check especially the root index.php script. Your host can tell you what these file permissions must be.
    3. You may not have the Apache autoindex_module installed. There is a line in several .htaccess files Zenphoto uses (the root .htaccess, one in the zp-data folder, and one in the cache folder) which is intended to prevent directory browsing of the folder(s). This line reads IndexIgnore * Remove this line.

    What is phpinfo() ?

    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():
    1. Open a new text document in your favorite text editor.
    2. Add the following line to the document: <? phpinfo(); ?>
    3. Save the document as phpinfo.php and upload it to your webserver in a web-accessible location.
    4. Execute the document by pointing your browser to the file (e.g.
    This will output a large amount of very useful information. 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.

    About magic_quotes and why they should be disabled

    To quote from the PHP manual itself:

    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 its 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 linemagic_quotes_gpc = Ontomagic_quotes_gpc = Off
    You can also disable magic_quotes_gpc in your zenphoto .htaccess file by adding the linephp_value magic_quotes_gpc off
    Please contact your hosting provider for further assistance.


    What it is

    mod_rewrite is an Apache module for translating URLs. In zenphoto with mod_rewrite enabled, 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 theGallery configuration tab. Uncheck the box for Enable mod_rewrite and press the Apply button.Or you can read the next question to see how to turn it on.

    How to enable it

    First, 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. When the apache module mod_rewrite is not loaded, you can´t use mod_rewrite within your ZenPhoto configuration. Via phpinfo() you can look to see if mod_rewrite is listed as loaded module. If is not, you can load it by open the httpd.conf of your apache and uncomment (delete the leading #) or add this line:
    LoadModule rewrite_module modules/

    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 looks like RewriteBase /zenphoto .

    Third, you need to make sure mod_rewrite option is enabled (see the last question.)

    Getting the file structure shown instead of the site

    Clearly the problem is that index.php isn't set as a default file for directories under Apache (or whichever server you're using).

    Two ways:

    1. 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:
    2. 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.

    Safe mode

    Safe mode is generally considered bad practice for web hosts and users, as it breaks many programs and does not provide any real improvement in security.

    1.0.8 and above should now be compatible with PHP safe mode. 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.

    Creative Commons LicenseThis text by is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

    Code examples are released under the GPL v2 or later license

    For questions and comments please use the forum or discuss on the social networks.

    Related items