Site failure after upgrading to 1.4.3

Upgraded to 1.4.3 from 1.4.2.4. Upgrade appeared to go well as far as Zenphoto went but then it broke my site. I now get the following error when trying to access the main site either by following the link on the Zenphoto page or going directly into the site:

Zenphoto has detected a change in your installation.

Zenphoto 1.4.3[10393] has been copied over an unknown release.

Please reinstall the following setup files from the 1.4.3 [10393] release:

zp-core/setup.php
zp-core/setup/setup-functions.php
zp-core/setup/setup-option-defaults.php
zp-core/setup/setup-primitive.php
zp-core/setup/setup-sqlform.php
zp-core/setup/setup.css
zp-core/setup/setup_permissions_changer.php
zp-core/setup/setup_set-mod_rewrite.php
zp-core/setup/setup_themeOptions.php

The change detected is critical. You must run setup for your site to function.

I reload the setup files as directed, run setup.php. I am told I need to be logged in to run setup. I login as admin, setup runs and gives three separate warnings:
  • relates to the revision of MySQL (running 5.1.63 - advises to run 5.5.0 or later. This warning usually come sup during an upgrade)

  • Warning!
    Perhaps there was a problem with the upload. You should check the following files:
    zp-core/setup.php
    zp-core/setup/setup-functions.php
    zp-core/setup/setup-option-defaults.php
    zp-core/setup/setup-primitive.php
    zp-core/setup/setup-sqlform.php
    zp-core/setup/setup.css
    zp-core/setup/setup_permissions_changer.php
    zp-core/setup/setup_set-mod_rewrite.php
    zp-core/setup/setup_themeOptions.php

    This in spite of the files being present having just been reloaded.

  • a huge list of files which should be removed:
    zp-core/admin-uploadify/
    zp-extensions
    etc. etc

I delete the extra files: some delete but a core remain which didn't delete. Mainly in the zp-core/zp-extensions/colorbox/ directory which I can't delete manually without changing file permissions.

In spite of the warning re: setup files I click "go" (since they are there). Setup completes. Zenphoto looks and works fine but the same problem re: the main site persists.

Debug log contains the following:

{Tue, 10 Jul 2012 14:49:18 GMT} Zenphoto v1.4.3[10393]
Backtrace: WARNING: require_once(/home/bpskdk/public_html/development/zenphoto/zp-core/setup/setup-functions.php) [function.require-once]: failed to open stream: No such file or directory in /home/bpskdk/public_html/development/zenphoto/zp-core/setup/setup_set-mod_rewrite.php on line 11
require_once called
from include (setup_set-mod_rewrite.php [11])
from index.php [92]

Setup log contains the following:

Zenphoto Setup v1.4.3[10393]: Tue, 10 Jul 2012 17:35:12 +0100
Warn: MySql Version 5.0.0 or greater is required. Version 5.5.0 or greater is preferred. Use a lower version at your own risk.
Warn: Perhaps there was a problem with the upload. You should check the following files: zp-core/setup.phpzp-core/setup/setup-functions.phpzp-core/setup/setup-option-defaults.phpzp-core/setup/setup-primitive.phpzp-core/setup/setup-sqlform.phpzp-core/setup/setup.csszp-core/setup/setup_permissions_changer.phpzp-core/setup/setup_set-mod_rewrite.phpzp-core/setup/setup_themeOptions.php

Warn: The following files could not be deleted.zp-core/admin-uploadifyzp-core/zp-extensions/tiny_mce/plugins/ajaxfilemanager/jscripts/edit_area/pluginszp-core/zp-extensions/class-video/getid3/!delete any module you don't like, but check dependencies.txtzp-core/zp-extensions/colorbox/themes/example2/imageszp-core/zp-extensions/colorbox/themes/example2zp-core/zp-extensions/colorbox/themes/example3/imageszp-core/zp-extensions/colorbox/themes/example3zp-core/zp-extensions/colorbox/themes/example1/images/ie6zp-core/zp-extensions/colorbox/themes/example1/imageszp-core/zp-extensions/colorbox/themes/example1zp-core/zp-extensions/colorbox/themes/example5/imageszp-core/zp-extensions/colorbox/themes/example5zp-core/zp-extensions/colorbox/themes/example4/images/ie6zp-core/zp-extensions/colorbox/themes/example4/imageszp-core/zp-extensions/colorbox/themes/example4zp-core/zp-extensions/colorbox/themeszp-core/zp-extensions/colorboxzp-core/admin-jQueryzp-core/rssthemes/effervescence_plus/images/slimboxthemes/effervescence_plus/images/smooththemes/effervescence_plus/scripts

Completed system check

Query ALTER TABLE `zp_images` DROP FOREIGN KEY ``zp_images`_ibfk1` Failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'zp_images`_ibfk1`' at line 1

Query ALTER TABLE `zp_comments` DROP FOREIGN KEY ``zp_comments`_ibfk1` Failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'zp_comments`_ibfk1`' at line 1

Set Zenphoto default options

Notice: "Module mod_rewrite" is working. The Zenphoto option "mod_rewrite" is "enabled".

Set theme default options for default started

Set theme default options for effervescence_plus started

Set theme default options for garland started

Option handler for default instantiated

Set theme default options for default completed

Option handler for effervescence_plus instantiated

Set theme default options for effervescence_plus completed

Set theme default options for rsigs started

Option handler for rsigs instantiated

Set theme default options for rsigs completed

Option handler for garland instantiated

Set theme default options for garland completed

Set theme default options for stopdesign started

Option handler for stopdesign instantiated

Set theme default options for stopdesign completed

Set theme default options for zenpage started

Option handler for zenpage instantiated

Set theme default options for zenpage completed

Set theme default options for zpmobile started

Option handler for zpmobile instantiated

Set theme default options for zpmobile completed

setup-functions.php deleted.

setup-option-defaults.php deleted.

setup-primitive.php deleted.

setup-sqlform.php deleted.

setup.css deleted.

setup_permissions_changer.php deleted.

setup_set-mod_rewrite.php deleted.

setup_themeOptions.php deleted.

setup.php deleted.

setup/ deleted.

Site info:

Zenphoto version 1.4.3 [10393] (Official build)
Current locale setting: en_US.UTF8
Current gallery theme: rsigs
PHP version: 5.3.13
Graphics support: PHP GD library bundled (2.0.34 compatible)
supporting: gif, jpg, jpeg, png, bmp
PHP memory limit: 96M (Note: Your server might allocate less!)
MySql version: 5.1.63
Database name: bpskdk_devroyalsignalsorguk
Table prefix: zp_
Spam filter: akismet_php5
CAPTCHA generator: zenphoto

This has happened three times: twice on the main site and once on a copy of the site uploaded to a "development" folder. ON the live site (first two attemnpts) I backed out 1.4.3 and went back to 1.4.2.4. The development site is currently failing.

Apologies for such verbosity. As much info as I could get has been included.

Michael

Comments

  • After further investigation I've isolated the problem to a "require_once" statement in a file used in my site which generates a standard layout for each page.

    The statement is:

    define('ROOT', ($_SERVER['DOCUMENT_ROOT']));
    define('WEBPATH', '/zenphoto');
    define('ZENFOLDER1', 'zp-core');

    //require_once(ROOT. "/" . WEBPATH . "/" . ZENFOLDER1 . "/template-functions.php");

    I use template-functions.php to display random thumbnails on the bottom of each page.

    If I comment out the above line then pages display correctly.

    If the line is kept in then I get the error shown above:

    Zenphoto has detected a change in your installation.

    Zenphoto 1.4.3[10393] has been copied over an unknown release.

    Please reinstall the following setup files from the 1.4.3 [10393] release:

    zp-core/setup.php
    zp-core/setup/setup-functions.php
    zp-core/setup/setup-option-defaults.php
    zp-core/setup/setup-primitive.php
    zp-core/setup/setup-sqlform.php
    zp-core/setup/setup.css
    zp-core/setup/setup_permissions_changer.php
    zp-core/setup/setup_set-mod_rewrite.php
    zp-core/setup/setup_themeOptions.php

    The change detected is critical. You must run setup for your site to function.

    This happens even after a completely fresh installation of Zenphoto 1.4.3

    It works fine with 1.4.2.4

    Michael
  • acrylian Administrator, Developer
    Most of your warnings are warnings. Zenphoto compares the file time and that does not match if you upload files later or have custom files. It is meant as a warning in case someone sneaked in unwanted stuff to your site.

    Regarding using functions outside ZP the 1.4.3 release has a bug because some internal path handling changed because of the clone feature. You need to install the trunk nightly. Also the code changed a little which is already documented here:
    http://www.zenphoto.org/news/zenphoto-as-a-plug-in-using-zenphoto-functions-from-outside-zenphoto
  • Thank you for the reply.

    Have uploaded and installed zenphoto-2012-07-09-trunk nightly and updated the plug-in code as shown on the referenced page.

    However I'm still getting the same error.

    All the core files were uploaded at the same time??

    Michael
  • Please be more detailed. Do those lines appear within Zenphoto scripts or just in external pages on your site? If the latter, does your site work normally when accessed directly?

    Looking at how that particular error is generated, either the database scripts have not loaded or the option table is empty. I suspect that the former is the case and is caused by some script error in the loading process. Please examine your PHP script error log for any errors reported.

    Also please describe the folder structure of your site and the exact values for each of your defines.
  • Thanks again for your response.

    The standalone Zenphoto part of the installation works fine after the upgrade. The new, clean install uses the default theme. I created a new set of database tables for this clean install and uploaded a few images into a test album.

    The Setup log shows the following errors regarding the database:

    Warn: MySql Version 5.0.0 or greater is required. Version 5.5.0 or greater is preferred. Use a lower version at your own risk. [Current MySql version: 5.1.63]

    Completed system check

    Query ALTER TABLE `zp_images` DROP FOREIGN KEY ``zp_images`_ibfk1` Failed. Error: You have an error

    in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'zp_images`_ibfk1`' at line 1

    Query ALTER TABLE `zp_comments` DROP FOREIGN KEY ``zp_comments`_ibfk1` Failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'zp_comments`_ibfk1`' at line 1

    The error appears whenever I try to access the main site, both from within Zenphoto using the "Home" link or if I try to access the site's home page direct.

    The main site uses a file called "PageTop.php" which is used to give a banner and a navigation sidebar for every page (i.e. the site's "theme"). Every main site page calls PageTop.php when loaded.

    PageTop.php is located in the site's development root directory (public_html/development).

    Zenphoto is located in a folder called "zenphoto" which is also in the site's development root directory

    PageTop.php includes the Zenphoto plug-in code which is now:

    1 <?php
    2 /*
    3 * This script is an example of how to use Zenphoto content from a Non-Zenphoto WEB page.
    4 * You must define SERVERPATH and WEBPATH to correctly point at the Zenphoto installation.
    5 * Here we are presuming that the running script is in the root of the WEBsite and the
    6 * Zenphoto installation is in a folder named "zenphoto" within that root folder.
    7 */
    8
    9 define('SERVERPATH',str_replace('\\','/',dirname(__FILE__)).'/zenphoto');
    10 define('WEBPATH','/'.basename(dirname(__FILE__)).'/zenphoto');
    11
    12 /*
    13 * Now we "include" the Zenphoto template functions. This will instantiate the Zenphoto 14 installation
    15 * and make all theme functions available to us.
    16
    17 */
    18 require_once(SERVERPATH.'/zp-core/template-functions.php');
    20 ?>

    The defines as shown above give the following values:

    SERVERPATH: /home/bpskdk/public_html/development/zenphoto
    WEBPATH: /development/zenphoto

    If I comment out line 18 then the error disappears and I can access the main site files (but of course I lose the Zenphoto plug-in functionality on my site).

    The same setup worked (and continues to work) fine with 1.4.2.4

    Michael
  • I should have added that the option table contains data.

    Michael
  • You can ignore the setup errors. They are not an issue.

    What you have done seems correct. Probably at this point you should create a ticket on this. We will probably have to give you debug files to try to trace the issue so the ticket method is the best tracker.
  • Ticket #2203 raised.

    Thanks for your help.
Sign In or Register to comment.