Upgrading from 1.2.5

Hi there, is it safe to upgrade from 1.2.5 directly to the latest version or should I do a staged upgrade, and if so, which versions should I do it with? (We had not been able to upgrade until now as the client's old server did not support PHP 5.)

Thanks in advance for your help.

Server deets:

Zenphoto version 1.2.5 [4022] (Official Build)
PHP version: 5.3.6
Graphics support: PHP GD library bundled (2.0.34 compatible)
PHP memory limit: 96M (Note: Your server might allocate less!)
MySQL version: 5.1.56
Active plugins:
* dynamic-locale v1.0.0
* filter-zenphoto_seo v1.0.0
Active filters:
* seoFriendlyURL
o 10: filter-zenphoto_seo.php => filterAccentedCharacters

Comments

  • fretzl Administrator, Developer
    I have successfully upgraded a site from 1.2.5 to 1.4.0.4 in one step.
    All I had to do was change some deprecated functions used in the theme.(I had myself guided by the errors that appeared)
    Best you look at one of the pages of a standard theme because they now use zp_apply_filter calls in the head, right after the body-open tag and right before the body-close tag.
    And don't forget to backup your database before you start.
  • For others contemplating such an upgrade. We do know that upgrading from 1.2.5 to the current release will work. However, note that the requirements of the current release are different from those of 1.2.5. In particular PHP 5 is required. Be sure to include a PHP upgrade in your plans if you are still on a version of PHP 4.

    As fretzl has noted, there have been structural changes to themes since 1.2.5 so if you are not using one of the distributed themes you will have to deal with the changes. The deprecated functions plugin will probably help in the translation and it does tell you what needs to be changed if one of the deprecated functions is used.
  • kp Member
    Thanks very much, both - very useful.

    I am using a slightly customized version of Default (whatever was the default with version 1.2.5). From what I recall, I didn't change too much of the functionality, mainly the look and feel.

    I will look for the new zp_apply_filter call in a current theme and copy-paste into my customized theme.

    > The deprecated functions plugin

    Where would I find this plug-in? Does it come with the current ZP Core and will it be automatically installed when I do the upgrade, or do I have to install it separately?

    Thanks again you both, very helpful.
  • fretzl Administrator, Developer
    The deprecated-functions plugin is under the plugins tab on the admin page.
    Just activate it and in the options check the functions you want to be warned about(just check them all)
    You'll automatcally will get a warning when a deprecated function is used.
    The warning will also tell you which function you should use instead.
  • kp Member
    Thanks, fretzl. I'll let you know how it goes.
  • kp Member
    After some finagling, I think I've managed to get the install on the test server updated! Tomorrow I'll attack the live server. Thanks again for your help, both of you!
  • fretzl Administrator, Developer
    Good to hear that :-)
  • kp Member
    And now the live server has been updated as well!

    Thought I'd post a list of some of the key things I had to do during the process, in case it helps others in the future:

    - create zp-data folder & check permissions, move zp-config.php from zp-core to zp-data
    - create setup_log.txt file in zp-data, check permissions
    - remove old .htaccess, check permissions on zenphoto folder, let setup script recreate new .htaccess on its own, reset permissions
    - create uploaded folder & check permissions
    - create cache_html folder & check permissions
    - remove plugins & themes folder & re-upload new ones, including my custom theme*
    - upload new index.php and overwrite old
    - re-select my stylesheet in Options > Theme as it defaulted to another

    *Changes I made in my custom theme:
    - add <?php zp_apply_filter('theme_body_open'); ?> after opening body tag, and <?php zp_apply_filter('theme_body_close'); ?> before closing body tag
    - comment out deprecated functions:

    $firstPageImages = normalizeColumns('2', '6');
    zenJavascript();

    Perhaps this will help someone someday. Thanks again for both your help.
  • fretzl Administrator, Developer
    Thanks for the checklist :-)
Sign In or Register to comment.