Upgrade to 1.4.5.8 breaks on zenphoto.cfg.php

I just ran an upgrade to 1.4.5.8 and everything looks OK except I get an error "Setup was not able to create this file. You will need to copy the zp-core/zenphoto_cfg.txt file to zp-data/zenphoto.cfg.php then edit it as indicated in the file's comments." when trying to access the site. The message says the the file does not exist. It is there in zp-data and I can login to the database through putty using the same credentials without a problem. I checked the logs and in the debug log the only thing is that the install could not create the robots.txt file. I created it. The last entry in the setup log is that setup completed.

Any ideas on what to look for?

Comments

  • Look for the folder permissions of the zp-data folder and the file permissions of the file.

    This sort of thing happens if the server is not configured so that WEB applications run under the same user as FTP applications. Then often Zenphoto cannot make changes it needs to make to things like the configuration file.
  • All the files from the top of the ZenPhoto install are owned by www-data:www-data. The zp-data directory is 600 as are all the files in it. I tried 700 and 644 with the same result. The install says to set it to 600. I am still getting a message that the zenphoto.cfg.php file does not exist. I saved the zenphoto.cfg.php that was working before I upgraded and made sure to use the same database info in the new zenphoto.cfg.php file.
  • try 0777
  • I have gone as far as setting every file and directory to 0777 and I now no longer get the error. I just get a blank screen. View Source shows nothing.

    I also deleted /plugins /themes /zp-core and /zp-dat and re-uploaded them to the server. When I try to go th the install at http://xxx.xxx.xxx.xxx/archive/zp-core/setup/index.php?autorun=gallery I get just a blank screen. The zenphoto.cfg.php has for the db connect the following:

    ////////////////////////////////////////////////////////////////////////////////
    // Database Information
    ////////////////////////////////////////////////////////////////////////////////
    $conf['db_software'] = 'MySQLi'; // preferred database
    /** for historical reasons these fields reference mysql even though the database **
    ** might be a different software **/
    $conf['mysql_user'] = 'user_name'; // Supply your Database user id.
    $conf['mysql_pass'] = 'passwd'; // Supply your Database password.
    $conf['mysql_host'] = 'xxx.xxx.xxx.xxx'; // Supply the name of your Database server.
    $conf['mysql_database'] = 'zp'; // Supply the name of Zenphoto's database
    // If you're sharing the database with other tables, use a prefix to be safe.
    $conf['mysql_prefix'] = "archive_";

    The install is in /var/www/archive and was working fine with the previous version of ZenPhoto. I can putty into the server and connect to the database using the above creds with no problem.
  • acrylian Administrator, Developer
    If you can please try also the support build, even if that is not that far from 1.4.5.8.
  • Always with blank screens there will be an error report somewhere. Most likely in your server's CGI logs, but ask your provider. That error code will be key to understanding what the problem is.
  • I got it sort of working. I created a new database and a new directory and moved the albums folders to it. Then I uploaded 1.4.5.8 to the new directory and did a fresh install. The install finished and I ma able to login to the admin section. All the albums and sub-albums show up and the photos are visible in the admin interface. When I click on View album it shows the first page and the thumbnails for it.

    However, when I click on an album I get a "The requested URL /zenphoto/Pre-2001/ was not found on this server." message. All the images show as published in admin. I am also seeing the following in the debug log:

    NOTICE: Constant SERVERPATH already defined in /var/www/zenphoto/zp-core/functions-basic.php(114) : eval()'d code on line 93
    define called from eval (functions-basic.php(114) : eval()'d code [93])
    from require_once (functions-basic.php [114])
    from require_once (admin-globals.php [12])
    from setup_pluginOptions.php [11]
    {18399:Fri, 03 Jan 2014 17:27:11 GMT}

    WARNING: htmlspecialchars() expects parameter 1 to be string, array given in /var/www/zenphoto/zp-core/functions-common.php on line 288
    htmlspecialchars called from html_encode (functions-common.php [288])
    from print_language_string_list (admin-functions.php [2528])
    from admin-options.php [1023]
    {18399:Fri, 03 Jan 2014 17:27:11 GMT}

    In the debug log I an seeing things like:
    [Fri Jan 03 09:52:54 2014] [error] [client 10.26.38.109] File does not exist: /var/www/zenphoto/Pre-2001, referer: http://10.26.38.106/zenphoto/index.php?album=Pre-2001
    [Fri Jan 03 10:02:40 2014] [error] [client 10.26.38.109] File does not exist: /var/www/zenphoto/Pre-2001, referer: http://10.26.38.106/zenphoto/
    [Fri Jan 03 10:02:53 2014] [error] [client 10.26.38.109] File does not exist: /var/www/zenphoto/2002, referer: http://10.26.38.106/zenphoto/
    [Fri Jan 03 10:03:14 2014] [error] [client 10.26.38.109] File does not exist: /var/www/zenphoto/Pre-2001, referer: http://10.26.38.106/zenphoto/
    [Fri Jan 03 10:05:15 2014] [error] [client 10.26.38.109] File does not exist: /var/www/zenphoto/Pre-2001, referer: http://10.26.38.106/zenphoto/
    [Fri Jan 03 10:05:19 2014] [error] [client 10.26.38.109] File does not exist: /var/www/zenphoto/2005, referer: http://10.26.38.106/zenphoto/
    [Fri Jan 03 10:13:21 2014] [error] [client 10.26.38.109] File does not exist: /var/www/zenphoto/Pre-2001, referer: http://10.26.38.106/zenphoto/
    [Fri Jan 03 10:14:21 2014] [error] [client 10.26.38.109] File does not exist: /var/www/zenphoto/Pre-2001, referer: http://10.26.38.106/zenphoto/

    This would seem to indicate that /albums/ is not being added to the path. If I manually add it I get a directory listing of the photos in that album.
  • What I am seeing is that index.php?album= is not being added to anything other that the top album view. If I manually add it to a URL it opens the album or photo.
  • I just finished a fresh install of Ubuntu 12.40 with Apache2, MySQL 5.5.34-0ubuntu0.12.04.1 and PHP Version 5.3.10-1ubuntu3.9. I then installed zenphoto-1.4.5.8 without any issues. After checking that the admin panel was working properly I FTPed a couple of directories of photos to the uplaoads directory. When I looked a ZenPhoto admin again the were showing up as albums. However, when I go the the website, the first page of albums shows up but if I click an an album link I get a file not found. The URL is in the format of http://servername/zenphoto/2001. If I change it to the format http://servername/zenphoto/index.php?album=2001/Christmas the sub-album comes up but I get a file not found if I try to view a photo.

    I thing I will update with the latest nightly build and see what happens or else backdate a release or so.
  • Sounds like you have set the Zenphoto `mod_rewrite` option but your server does not support URL redirection. Un-set the `mod_rewrite` option on the general options tab.

    It is also possible that the `.htaccess` file is wrong, but not likely if you did a fresh install.

    The `NOTICE: Constant SERVERPATH already defined` is probably an artifact of your initial problems. Certainly if you are running now at all the root issue is gone.
  • That was it. It must have gotten set during the upgrade as the server was running an older version of ZenPhoto before I upgraded. At any rate, the site is running great now. This is a really good program with great support.
Sign In or Register to comment.