Installation troubles

Something is not working correctly for installing. I uploaded the zenphoto files. Then I ran setup (studiopickett.com/zenphoto/zp-core/setup.php as per instructions. It did not ask me for any info - it just spat out a list of errors. It complained that zp-config.php.source should be changed to zp-config.php - after I do that, it then complains that there is no zp-config.php.source file.

Then it complains - Could not connect to the MySQL server. Check the user, password, and database host and try again - it never asked me for this info. I'm not a programmer - I have no idea where I''m supposed to put this manually - and why should I have to do this manually? I thought this was supposed to be easy.

I did this once. I then deleted all files on the server and re-unzipped the downloaded file and re-uploaded everything and did it again. Same problems. Plz - what did I miss of fail to do or do wrong?

Comments

  • Most likely the file permissions on your site prevented Zenphoto setup from creating the zp-config.php file. That is why you were instructed to copy the source file. When you do that, you also need to edit the file with your MySql user, password, and host information. (The error message did tell you this, but perhaps it was not specific enough with what you should edit.)

    The error you are currently getting does tell you to check those values!
  • Where do I edit it? What do I type? Am I supposed to create a MySQL database? Years ago, I installed wordpress and it led me through creating a MySQL database and getting setup. Are there detailed instructions for doing this with Zenphoto?
  • acrylian Administrator, Developer
    You need of course to create the database yourself. You need to do that on your host's user interface. Zenphoto can't do that, but it will create the necessary database tables (as Wordpress does)
  • ok. I made a database - called it zenphoto, and created a user. Now what? How do I tell zenphoto about it?
  • acrylian Administrator, Developer
    Run setup then there should be fields to fill in the database info like user, passoword. Or use the zp-config.php file to fill in that info manually.
  • I dug out the wordpress php file to see what it looked like and used it as a guide. That has solved the problem. Perhaps you should make a sample file and instructions for others in the future to follow.

    Thx.
  • acrylian Administrator, Developer
    Normally setup will use the zp-config.php-soure file to create the zp-config.php file after you entered the data in the form displayed.
  • Well, the `zp-config.php.source` file is the example. Not sure how much more clear it could be, but we will add more commentary.

    The biggest problem you have is that Zenphoto cannot write to the folder. If there are other folders (albums, cache) like that, Zenphoto will not work.
  • I'm slowly getting the file permissions set correctly. As I fiddle, it lets me know which folders/files need the change made. That's not causing me too much grief, so far.

    The zp-config.php file is really hard to read due to you not putting each command/item on a separate line. It also does not give any hint what the correct answers are. I would never have come up with the answer "localhost" on my own in a million years.
  • What file are you looking at? Each item is on a separate line in zp-config.php. And "localhost" is the value set by default for 'mysql_host'.
    `
    <?php /* PUT NOTHING BEFORE THIS LINE, not even a line break! */
    $conf = array();

    /** Do not edit above this line. **/
    /**********************************/

    /*////////// zenPHOTO Configuration Variables ///////////////////////////////
    Note: zp-config.php.source is the source file for zp-config.php

    For most installations Setup.php will copy zp-config.php.source to zp-config.php and
    make the necessary changes to it. Unless this fails you most likely have no need even
    to read this file.

    If for some reason setup.php is not able to edit the zp-config.php file and you cannot
    fix the file/folder permissions so that it can then you may have copy the
    zp-config.php.source file to zp-config.php and make changes here manually.

    Advanced installations may wish to modify the album folder definitions below.

    Also on some servers zenphoto has problems correctly determining the WEB path and SERVER
    path. For these cases you will need to implement the path overrides below.
    ///////////////////////////////////////////////////////////////////////////////*/

    ////////////////////////////////////////////////////////////////////////////////
    // Database Information
    ////////////////////////////////////////////////////////////////////////////////

    $conf['mysql_user'] = '';
    $conf['mysql_pass'] = '';
    $conf['mysql_host'] = 'localhost'; // Won't need to change this 90% of the time.
    $conf['mysql_database'] = ''

    // If you are having problems with displaying some characters you may have to change the following.
    $conf['UTF-8'] = true;

    // If you're sharing the database with other tables, use a prefix to be safe.
    $conf['mysql_prefix'] = "zp_";

    ////////////////////////////////////////////////////////////////////////////////
    // zp-config.php required options
    ////////////////////////////////////////////////////////////////////////////////

    // location of album folder.
    // 'album_folder' is the name of the folder for the zenphoto albums.
    // 'album_folder_class' determines how to interpret 'album_folder':
    // 'std' -- the folder must be a simple name. It resides in the root of the zenphoto installation.
    // 'in_webpath' -- the folder must be the full path of the album folder from the WEB root of the zenphoto installation.
    // 'external' -- the folder must be a full server path to the album folder. Images within an external folder
    // are not visible to web browsers, so certain features such as flash players cannot display them
    $conf['album_folder'] = '/albums/';
    $conf['album_folder_class'] = 'std';

    // Server Protocol
    // Change this to "https" if you use an HTTPS server (a "https://..." url)
    // Otherwise you should leave it at "http"
    // NOTE: If you change this on an already installed configuration you will also have to change the
    // gallery configuration server protocal option.
    $conf['server_protocol'] = "http";

    ////////////////////////////////////////////////////////////////////////////////
    // Path Overrides
    ////////////////////////////////////////////////////////////////////////////////
    // Uncomment the following two lines ONLY IF YOU'RE HAVING PROBLEMS,
    // like "file not found" or "not readable" errors.
    // These allow you to override Zenphoto's detection of the correct paths
    // on your server, which might work better on some setups.
    ////////////////////////////////////////////////////////////////////////////////

    // define('WEBPATH', '/zenphoto');
    // define('SERVERPATH', '/full/server/path/to/zenphoto');

    ////////////////////////////////////////////////////////////////////////////////
    // chmod mask
    ////////////////////////////////////////////////////////////////////////////////
    // Change the following define if you wish to increase the security of your site.
    // When Zenphoto creates files or folders it sets their permissions based on this
    // value. The value is masked with whatever Zenphoto would otherwise have used for
    // the chmod() parameter. So, if you remove a permission from this mask, it will
    // be removed from the permissions set by Zenphoto. A secure setting would be a value
    // of 0755.
    //
    // NOTE:
    // When you make a fresh installation of Zenphoto there normally is not a zp-config.php
    // file present. Setup copies zp-config.php.source to create this file. But, of course,
    // happens only after setup has been up and running. So without a zp-config.php file
    // setup will be using its own default version of the definition. To get around this
    // startup issue, copy zp-config.php.source to zp-config.php and make your edits.
    // Then run setup.
    ////////////////////////////////////////////////////////////////////////////////
    if (!defined('CHMOD_VALUE')) { define('CHMOD_VALUE', 0777); }

    ////////////////////////////////////////////////////////////////////////////////

    /** Do not edit below this line. **/
    /**********************************/

    $_zp_conf_vars = $conf;
    unset($conf);

    ?>
    `
  • I opened the file for editing in notepad and there were no line breaks nor paragraph breaks. Just one big run-on paragraph. Very un-readable.

    "localhost" was not filled in - I had to type it in.
  • Get a modern editor (http://notepad-plus.sourceforge.net/uk/site.htm). All Zenphoto files use Unix line endings. "localhost" has been default filled in since forever in the zenphoto distribution examples. If yours was not, someone has altered your file.
  • Another great editor is bluefish ( http://bluefish.openoffice.nl/ ) from the open office project. Maybe try this one
Sign In or Register to comment.