New install fails - usual fixes don't work

I recently tried to install ZP for a client: latest version downloaded from ZP site, unzipped in usual fashion. When trying to run setup, I get this error:

"Parse error: syntax error, unexpected '=', expecting ')' in /home/photo181/public_html/pl/zp-core/template-functions.php on line 4167"

This, as I recall was something that was fixed a long time ago - an error traced to incompatibility with PHP4. I checked the client's hosting, and the installed PHP is PHP4+

I tried to run through the whole install a couple more times to make sure I wasn't getting a damaged file, but no joy.

Ideas on how to fix this?

TIA for your collective wisdom...

Comments

  • os07 Member
    Ah, I thought it was something like that. I went in and saw that the server also offers PHP 5 (not 5+ or 5.2) I switched the server over to PHP 5; is it worth it to re-load the ZP files and try again?

    Alternatively, which is the last ZP verison that will work with PHP 5?
  • First PHP5+ means any version of PHP which is 5 or greater, so the version on your server probably works. The caviat here is that we do not test with all PHP versions and sometimes there are incompatibilities we do not know of. Right now there seems to be a problem with PHP5.10 on some installs, for instance.

    The current version of Zenphoto will probably work with that server.
  • os07 Member
    Oh, I see. I tried to run the install, but I get these errors, which seem to indicate a missing file, "folder-definitions.php" - not a file I can find. I have changed the zenphoto folder to be named "pl" here.

    Warning: require_once(/home/pl/zp-core/folder-definitions.php) [function.require-once]: failed to open stream: No such file or directory in /home/pl/zp-core/functions-basic.php on line 11

    Fatal error: require_once() [function.require]: Failed opening required '/home/pl/zp-core/folder-definitions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pl/zp-core/functions-basic.php on line 11
  • There is no such file in the current Zenphoto installation. This would lead me to believe that your upload somehow has mixed Zenphoto versions.

    The `folder-definitions.php` file is circa the 1.2 to 1.3 release.

    Perhaps you should clean out the folders and re-install being careful that you have cleanly extracted the install package.
  • os07 Member
    I started again from scratch, beginnig by unzipping the archive. Worked this time, but some problems with "interpreting" the server's MySQL info. I was able to get to the install page once, but now all I can get is a small dialog box whuich states:

    Zenphoto encountered an error
    MySQL Error: Zenphoto received the error Access denied for user 'myusername'@'localhost' (using password: YES) when connecting to the database server.

    Do I have to begin all over again?
  • No, but you will have to find the correct MySQL credentials, database, and host information. The error above is from MySQL saying the connection was denied for what you provided.

    If you are using a hosting service, the database server is almost never "localhost", for instance.
  • os07 Member
    Yes, I am going through all of these things, and did speak to the tech rep for the hosting service, who was very helpful.

    He suggested that in place of "localhost" I try the actual IP address of the server. This also fails for the same reason. A more specific error message from ZP now appears:

    Zenphoto encountered an error
    MySQL Error: The database is connected, but MySQL returned the error Access denied for user...

    This particular host assigns users for MySQL databases by appending a username to the main administrative username for logging into the hosting admin panels, thus:

    mainuser123_dbusername@localhost

    There is only one user for the database, amd if I go into the MySQL control panel for this host, and that user is shown as:

    mainuser123_dbusername

    But I still cannot get in using this info. I am trying to fix this by editing the zenphoto.cfg file and uploading it to the site, but somehow I still have not specified my info in a way that ZP can install.
  • You are talking to the right people when you talk to your host. The credentials you give zenphoto must be the ones that allow you to access the database.

    You would need to provide both the user id and the password, of course, and both must be correct. The latest error message does tell you that Zenphoto has connected to A database (not necrssarily the one that houses your data) but was denied access. This means the user credentials are not correct. Only your service provider can help you with this.
  • os07 Member
    Thanks - I figured this out. It turned out that the hosting service had a rather unusual setup in that it allowed the creation of users under a specific database, BUT, after one created a user for that database, one had to go through a separate step of "adding" the user. So, while the user existed, it was not attached to the db. All working fine, now.
Sign In or Register to comment.