Upgrade fails

I have 3 installs sharing a database. The first upgrade went OK (1.2.2 to 1.4.1.6). I know skipping is not recommended so I did it on the setup that was private in case it failed. I also changed the db password as we had been hacked earlier. The upgrade mostly worked (a few visual issues in the customization) but things opened up, the theme (highslide) was recognized, etc. So I moved on to the next install. It seems to work until I try and go to administer and get completely unformatted admin system with may things not working. I'd post a screen shot but I don't see a way here.

Anyway, I did the 3rd and it borked in a different way. It picks up the theme and all but when I go from galleries to images there are none. All are using Highslide theme. I did not overwrite that. They can obviously get to the db.

Thoughts, help appreciated.
«1

Comments

  • Messed up formattign is an indication that the CSS is not loading. I do not know if the highslide theme is updated to be compatible with the current Zenphoto. If not it may be throwing errors that are messing things up. Check your PHP error logs.

    I really do not know why the installs would fail differently, though. Were the setup reports all "clean"? Check also to be sure you have not accidentally used the same table prefix in more than one install.
  • The highslide is working in the first. Not the others. Each has a different prefix in the database and each seems to be getting to the right one. But the admin console is completely hosed in one. How would IT not load its own css? Also, many parts don't work (e.g. the themes section has labels but no working buttons for edit. activate. etc. so I can't even switch to another theme.)

    I tried removing the files (except album and cache folders and the customized Highslide theme. Then did the upgrade again. Same results.

    Are the php error logs in the zen install somewhere?
    This is the setup log (that I CAN get to in the admin for this install)
    Zenphoto Setup v1.4.1.6[8326] Thu, 15 Dec 2011 09:40:06 -0700

    warn: PHP version 5.2.17 Version 5.3 or greater is strongly recommended.

    warn: PHP magic_quotes_gpc [is enabled] You should consider disabling magic_quotes_gpc. For more information See What is magic_quotes_gpc and why should it be disabled? in the Zenphoto troubleshooting guide.

    warn: The Zenphoto filesystem character define is ISO‑8859‑1 [no test performed] Setup did not perform a test of the filesystem character set. You can cause setup to test for a proper definition by creating a file in your zp-data folder named charset.tést and re-running setup.If your server filesystem character set is different from ISO‑8859‑1 and you create album or image filenames names containing characters with diacritical marks you may have problems displaying the names.Change the filesystem character set define to Unknown ASMO-708 DOS-720 ISO-8859-6 WINDOWS-1256 IBM775 ISO-8859-4 WINDOWS-1257 IBM852 ISO-8859-2 WINDOWS-1250 EUC-CN GB2312 HZ-GB-2312 BIG5 cp866 ISO-8859-5 KOi8-R KOi8-U WINDOWS-1251 IBM737 ISO-8859-7 WINDOWS-1253 IBM869 DOS-862 ISO-8859-8-i ISO-8859-8 WINDOWS-1255 CP870 CP1026 EBCDIC-CP-US IBM861 EUC-JP ISO-2022-JP CISO2022JP SHIFT_JIS KS_C_5601-1987 EUC-KR ISO-2022-KR JOHAB ISO-8859-3 ISO-8859-15 IBM437 WINDOWS-874 IBM857 ISO-8859-9 WINDOWS-1254 US-ASCII UNICODE UNICODEFFFE UTF-7 UTF-8 WINDOWS-1258 IBM850 ISO-8859-1 MACINTOSH WINDOWS-1252apply.If you do not know the character set try "UTF-8"

    Completed system check

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

    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.
  • You would have to ask your provider where to find your PHP error log. As to the setup log, the only thing that needs attention is the magic_quotes_gpc.

    There are all sorts of reasons why the admin might not load its css--mostly due to script errors, thus the request to look at the error logs.
  • OK, I have the error logs. What should I be looking for?
  • Uhm, errors... What is shown in the logs? Since normally this works, we have no guess as to what would have failed to prevent it from working.

    One useful technique is to clear your log and re-run so that only errors related to the problem would show up.
  • OK, here is the log from the install attempt yesterday morning. These were the errors thrown by the version that has no formatting in the admin area, no functionality of the themes section, is choosing the wrong theme (defualt rather than Highslide although it sees Highslide and all the others installed). The path inside the hosting has been replaced here for security reasons but is correct.

    It is saying no such file yet the the files were put up in the install and are there when I check.

    [15-Dec-2011 09:13:49] PHP Warning: require_once(/correct-path/fineart/zp-core/global-definitions.php) [function.require-once]: failed to open stream: No such file or directory in /correct-path/fineart/index.php on line 4
    [15-Dec-2011 09:13:49] PHP Fatal error: require_once() [function.require]: Failed opening required '/correct-path/fineart/zp-core/global-definitions.php' (include_path='.:/usr/lib64/php:/usr/lib/php:/usr/share/pear') in /correct-path/fineart/index.php on line 4
    [15-Dec-2011 09:32:41] PHP Warning: require(/correct-path/fineart/zp-data/zp-config.php) [function.require]: failed to open stream: No such file or directory in /correct-path/fineart/zp-core/functions-basic.php on line 58
    [15-Dec-2011 09:32:41] PHP Fatal error: require() [function.require]: Failed opening required '/correct-path/fineart/zp-data/zp-config.php' (include_path='.:/usr/lib64/php:/usr/lib/php:/usr/share/pear') in /correct-path/fineart/zp-core/functions-basic.php on line 58
  • Your install is faulty. The above message says that there are a script files either missing or not accessable. If the files are present on the paths shown in the error message then there is a file permissions issue. At anyrate, this problem is "below" Zenphoto as it is not able to load its critical files.
  • Interesting as I did exactly the same process on all of these installs yet they each worked out differently. I'll try yet again. I assume that the file permissions should be 755 for most things. How strict can I set the htaccess after I'm done (I prefer 444 to help avoid htaccess hacks)
  • acrylian Administrator, Developer
    Changes to the htaccess are if only required on major updates (setup will tell).
  • Zenphoto as it currently stands does not work with 0444 as it does need to write into some folders. 0755 should be correct and is prefered, but that really depends on the server.

    Just for your interest we are working on making the "read only" install be viable as part of the 1.4.3 release.
  • I meant 444 just for htaccess after the install is complete and working.
  • Ok, that should not be a problem, then.
  • So, I deleted everything except the cache, cache_html and albums.

    Uploaded again. Better result but still not right. Admin is better but no formatting. Many things don't work. Portfolio opens and albums and subalbums display but when you try and go to a subalbum you get no image display.

    Error log below (path redacted again). I checked permissions (installer said it was set to 755. Most things set to 700 or 644. Is there a list of what files should have what permissions? I'm guessing some of the below is a high slide problem (deprecated calls and functions although it works in the private set). Still, I need to get the admin interface working. You can look at what is broken and how at dennsantorophoto.com if you like. There are installations for the Fine arts and performance sections.

    [16-Dec-2011 01:16:31] PHP Fatal error: Call to undefined function getadministrators() in /correct-path/fineart/rss.php on line 75 [16-Dec-2011 14:21:00] PHP Fatal error: Call to undefined function getadministrators() in /correct-path/fineart/rss.php on line 75 [16-Dec-2011 18:05:35] PHP Warning: require(/correct-path/fineart/zp-data/zp-config.php) [function.require]: failed to open stream: No such file or directory in /correct-path/fineart/zp-core/functions-basic.php on line 58 [16-Dec-2011 18:05:35] PHP Fatal error: require() [function.require]: Failed opening required '/correct-path/fineart/zp-data/zp-config.php' (include_path='.:/usr/lib64/php:/usr/lib/php:/usr/share/pear') in /correct-path/fineart/zp-core/functions-basic.php on line 58 [16-Dec-2011 18:19:11] PHP Notice: zenJavascript (called from index.php line 14) is deprecated Use zp_apply_filter("theme_head"). in /correct-path/fineart/zp-core/zp-extensions/deprecated-functions.php on line 70 [16-Dec-2011 18:19:17] PHP Notice: normalizeColumns (called from album.php line 4) is deprecated Use instead the theme options for images and albums per row. in /correct-path/fineart/zp-core/zp-extensions/deprecated-functions.php on line 70 [16-Dec-2011 18:19:17] PHP Notice: zenJavascript (called from album.php line 14) is deprecated Use zp_apply_filter("theme_head"). in /correct-path/fineart/zp-core/zp-extensions/deprecated-functions.php on line 70 [16-Dec-2011 18:19:20] PHP Notice: normalizeColumns (called from album.php line 4) is deprecated Use instead the theme options for images and albums per row. in /correct-path/fineart/zp-core/zp-extensions/deprecated-functions.php on line 70 [16-Dec-2011 18:19:20] PHP Notice: zenJavascript (called from album.php line 14) is deprecated Use zp_apply_filter("theme_head"). in /correct-path/fineart/zp-core/zp-extensions/deprecated-functions.php on line 70 [16-Dec-2011 18:19:20] PHP Fatal error: Call to undefined function createalbummenulink() in /correct-path/fineart/themes/highslide/album.php on line 57 [16-Dec-2011 18:19:56] PHP Notice: zenJavascript (called from index.php line 14) is deprecated Use zp_apply_filter("theme_head"). in /correct-path/fineart/zp-core/zp-extensions/deprecated-functions.php on line 70
  • You still do not have a proper install.

    The only files Zenphoto puts into the root are the index.php, .htaccess, and perhaps the robots.txt and favicon.ico files.

    So there should be no rss.php file there. If it is not there it cannot generate the error. Presumably this is a file from an old installation.

    The deprecated functions errors are from a theme that has not been updated. Thre is much documentation on what to do with these instances. You can either fix the theme as directed by the message or you can disable the message in the deprecated functions plugin.

    The error on zp-data/zp-config.php is presumably because that file does not exist. It must, and is created by setup or setup will complain. I presume you are using the Zenphoto installation process and not some third party "helper" scripts.
  • OK, I deleted the unneeded files in the root. I don't know why the log reported the zp-data/zp-config.php wasn't there as it is (it was created by the install without any complaints that I saw.

    I'll look into the themes issues but I still have completely uncss'ed admin area with lots of things not working. (it appears as there is no formatting of the interface it is just in line down the screen). It now shows the right theme selected but I have no functioning option for changing the theme. I'm guessing this is a permissions issue as everything appears to have uploaded properly.

    The opening of the admin interface generated no errors in the php error log. There are no errors in the install log, just the warnings about magic quotes and untested character sets.

    Also, I am installing maually (SFTP) not through a script (but a nice installer script like pro dada uses would be a great addition!)
  • The only other thing I can think of is to check your apache access log (it is different from the error log) and see if there is anything in there regarding admin.css.
  • I'll have to find out if I can access the log. Its a shared hosting setup.

    hmm.. permissions maybe? What permissions should the admin.css be set to? it is there and appears to be at 700. I checked the generated source when I went into the uncss'd version and the call is there and correct.
    3 css's are called:
    admin.css
    toggleElements.css
    jquery_ui_zenphoto.css

    If I try and click on the css link in the source I get: (html stripped)
    403 Forbidden
    Forbidden
    You don't have permission to access /fineart/zp-core/admin.css
    on this server.
    Additionally, a 404 Not Found
    error was encountered while trying to use an ErrorDocument to handle the request.

    Then the server and port address which appear correct.
  • Sorry, but the answer to what permissions the file should be set to depends on how your server is configured. Ideally it should be 0444 or 0644. Certainly 0700 will cause problems because the file is denied to the public (e.g. the WEB browser.)
  • OK, it WAS a permissions issue. For some reason the files all went up as 700. I explicitly told the ftp to set them to 644 and did the upload and setup again and now the admin interface is fine.

    Checking the error log now I get a failure of the function

    createalbummenulink()

    Which I search for on the zen photo web site docs and find nothing about. It isn't listed in the deprecated functions. So it is failing the menu functions and borking the css as well. Has it been replaced with another function? Is it a plugin that I now need to explicitly turn on. I can not find reference to it.

    I was originally helped through this a couple of years ago in this post: http://www.zenphoto.org/support/topic.php?id=5261#post-30768

    The operative (or now non-operative code) that WAS working before the upgrade is
    `
    <?php $parent = $_zp_current_album->getParent();
    if (!is_null($parent)) { ?>
      <?php
      /*printAlbumMenuList("list-top",'','','mmhere','',"","", false);*//*works but no highlight of parent album*/
      $ParentTitle = $parent->getTitle();
      $gallery = $_zp_gallery;
      $albums = $_zp_gallery->getAlbums();
      foreach ($albums as $toplevelalbum) {
      $topalbum = new Album($gallery,$toplevelalbum,true);
      if ($ParentTitle == $topalbum->gettitle()) { ?>
      <?php createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list"); ?>
      <?php } else {
      createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list");?> <?php }}
      ?>
    <?php
    /*printAlbumMenuList("list-sub",'','','mmhere','',"mmhere","", false);*/}
    else {
    printAlbumMenuList("list-top",'','','mmhere','',"","", false);
    }

    ?>
    `
  • OK, it WAS a permissions issue. For some reason the files all went up as 700. I explicitly told the ftp to set them to 644 and did the upload and setup again and now the admin interface is fine.

    Checking the error log now I get a failure of the function

    createalbummenulink()

    Which I search for on the zen photo web site docs and find nothing about. It isn't listed in the deprecated functions. So it is failing the menu functions and borking the css as well. Has it been replaced with another function? Is it a plugin that I now need to explicitly turn on. I can not find reference to it.

    I was originally helped through this a couple of years ago in this post: http://www.zenphoto.org/support/topic.php?id=5261#post-30768

    The operative (or now non-operative code) that WAS working before the upgrade is
    `
    <?php $parent = $_zp_current_album->getParent();
    if (!is_null($parent)) { ?>
      <?php
      /*printAlbumMenuList("list-top",'','','mmhere','',"","", false);*//*works but no highlight of parent album*/
      $ParentTitle = $parent->getTitle();
      $gallery = $_zp_gallery;
      $albums = $_zp_gallery->getAlbums();
      foreach ($albums as $toplevelalbum) {
      $topalbum = new Album($gallery,$toplevelalbum,true);
      if ($ParentTitle == $topalbum->gettitle()) { ?>
      <?php createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list"); ?>
      <?php } else {
      createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list");?> <?php }}
      ?>
    <?php
    /*printAlbumMenuList("list-sub",'','','mmhere','',"mmhere","", false);*/}
    else {
    printAlbumMenuList("list-top",'','','mmhere','',"","", false);
    }

    ?>
    `
  • OK, it WAS a permissions issue. For some reason the files all went up as 700. I explicitly told the ftp to set them to 644 and did the upload and setup again and now the admin interface is fine.

    Checking the error log now I get a failure of the function

    createalbummenulink()

    Which I search for on the zen photo web site docs and find nothing about. It isn't listed in the deprecated functions. So it is failing the menu functions and borking the css as well. Has it been replaced with another function? Is it a plugin that I now need to explicitly turn on. I can not find reference to it.

    I was originally helped through this a couple of years ago in this post: http://www.zenphoto.org/support/topic.php?id=5261#post-30768

    The operative (or now non-operative code) that WAS working before the upgrade is
    `
    <?php $parent = $_zp_current_album->getParent();
    if (!is_null($parent)) { ?>
      <?php
      /*printAlbumMenuList("list-top",'','','mmhere','',"","", false);*//*works but no highlight of parent album*/
      $ParentTitle = $parent->getTitle();
      $gallery = $_zp_gallery;
      $albums = $_zp_gallery->getAlbums();
      foreach ($albums as $toplevelalbum) {
      $topalbum = new Album($gallery,$toplevelalbum,true);
      if ($ParentTitle == $topalbum->gettitle()) { ?>
      <?php createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list"); ?>
      <?php } else {
      createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list");?> <?php }}
      ?>
    <?php
    /*printAlbumMenuList("list-sub",'','','mmhere','',"mmhere","", false);*/}
    else {
    printAlbumMenuList("list-top",'','','mmhere','',"","", false);
    }

    ?>
    `
  • OK, it WAS a permissions issue. For some reason the files all went up as 700. I explicitly told the ftp to set them to 644 and did the upload and setup again and now the admin interface is fine.

    Checking the error log now I get a failure of the function

    createalbummenulink()

    Which I search for on the zen photo web site docs and find nothing about. It isn't listed in the deprecated functions. So it is failing the menu functions and borking the css as well. Has it been replaced with another function? Is it a plugin that I now need to explicitly turn on. I can not find reference to it.

    I was originally helped through this a couple of years ago in this post: http://www.zenphoto.org/support/topic.php?id=5261#post-30768

    The operative (or now non-operative code) that WAS working before the upgrade is
    `
    <?php $parent = $_zp_current_album->getParent();
    if (!is_null($parent)) { ?>
      <?php
      /*printAlbumMenuList("list-top",'','','mmhere','',"","", false);*//*works but no highlight of parent album*/
      $ParentTitle = $parent->getTitle();
      $gallery = $_zp_gallery;
      $albums = $_zp_gallery->getAlbums();
      foreach ($albums as $toplevelalbum) {
      $topalbum = new Album($gallery,$toplevelalbum,true);
      if ($ParentTitle == $topalbum->gettitle()) { ?>
      <?php createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list"); ?>
      <?php } else {
      createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list");?> <?php }}
      ?>
    <?php
    /*printAlbumMenuList("list-sub",'','','mmhere','',"mmhere","", false);*/}
    else {
    printAlbumMenuList("list-top",'','','mmhere','',"","", false);
    }

    ?>
    `
  • OK, it WAS a permissions issue. For some reason the files all went up as 700. I explicitly told the ftp to set them to 644 and did the upload and setup again and now the admin interface is fine.

    Checking the error log now I get a failure of the function

    createalbummenulink()

    Which I search for on the zen photo web site docs and find nothing about. It isn't listed in the deprecated functions. So it is failing the menu functions and borking the css as well. Has it been replaced with another function? Is it a plugin that I now need to explicitly turn on. I can not find reference to it.

    I was originally helped through this a couple of years ago in this post: http://www.zenphoto.org/support/topic.php?id=5261#post-30768

    The operative (or now non-operative code) that WAS working before the upgrade is
    `
    <?php $parent = $_zp_current_album->getParent();
    if (!is_null($parent)) { ?>
      <?php
      /*printAlbumMenuList("list-top",'','','mmhere','',"","", false);*//*works but no highlight of parent album*/
      $ParentTitle = $parent->getTitle();
      $gallery = $_zp_gallery;
      $albums = $_zp_gallery->getAlbums();
      foreach ($albums as $toplevelalbum) {
      $topalbum = new Album($gallery,$toplevelalbum,true);
      if ($ParentTitle == $topalbum->gettitle()) { ?>
      <?php createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list"); ?>
      <?php } else {
      createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list");?> <?php }}
      ?>
    <?php
    /*printAlbumMenuList("list-sub",'','','mmhere','',"mmhere","", false);*/}
    else {
    printAlbumMenuList("list-top",'','','mmhere','',"","", false);
    }

    ?>
    `
  • OK, it WAS a permissions issue. For some reason the files all went up as 700. I explicitly told the ftp to set them to 644 and did the upload and setup again and now the admin interface is fine.

    Checking the error log now I get a failure of the function

    createalbummenulink()

    Which I search for on the zen photo web site docs and find nothing about. It isn't listed in the deprecated functions. So it is failing the menu functions and borking the css as well. Has it been replaced with another function? Is it a plugin that I now need to explicitly turn on. I can not find reference to it.

    Hmm, when I try and post a link to another thread and relevant code the post fails. I'll try and add them as separate posts after this.
  • I was originally helped through the code that ended up using the createalbummenulink() a couple of years ago in this post: http://www.zenphoto.org/support/topic.php?id=5261#post-30768
  • The operative (or now non-operative code) that WAS working before the upgrade (see above post) is
    `
    <?php $parent = $_zp_current_album->getParent();
    if (!is_null($parent)) { ?>
      <?php
      /*printAlbumMenuList("list-top",'','','mmhere','',"","", false);*//*works but no highlight of parent album*/
      $ParentTitle = $parent->getTitle();
      $gallery = $_zp_gallery;
      $albums = $_zp_gallery->getAlbums();
      foreach ($albums as $toplevelalbum) {
      $topalbum = new Album($gallery,$toplevelalbum,true);
      if ($ParentTitle == $topalbum->gettitle()) { ?>
      <?php createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list"); ?>
      <?php } else {
      createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list");?> <?php }}
      ?>
    <?php
    /*printAlbumMenuList("list-sub",'','','mmhere','',"mmhere","", false);*/}
    else {
    printAlbumMenuList("list-top",'','','mmhere','',"","", false);
    }

    ?>
    `
  • Guess I can't post a direct link to it but the relevant other thread where this was originally worked out was:
    Getting Album titles for same level albums from March 2009 started by me.
  • I do not see a reference to `createAlbumMenuLink()` in that thread. I also do not have any memory of such a function. It may have existed in ancient history, but certainly not recently. We have been pretty dilligent in making deprecated versions of any function we remove.

    There is a sort of reference, though, in the comments of `printAlblumMenuList()` in the print_album_menu plugin. So maybe it was from a varient of that plugin.
  • Well, it was functioning in at least version 1.2.2. So is there a new function that will get the url that a link is supposed to represent. Obviously I was using printalbummenulist() and need to be able to have the generated menu actually go somewhere but be created on the fly for the albums and subalbums. That is what the code was doing but now it fails fatally. It has to have been somewhere in the documentation as I'm sure I would never have come up with `createAlbumMenuLink($topalbum,$option2,$css_class_topactive,$albumpath,"list")` on my own
  • acrylian Administrator, Developer
    Well, 1.2.2 has been a long time ago. There is no such function anymore.

    You can use the print_album_menu function within the menu_manager actually. See te theme-options.php file of the Zenpage theme for example how to set up an automatic creation.
Sign In or Register to comment.