Upgrading from 1.2.5 - Recommendations

Hi there,

I want to upgrade an installation from 1.2.5. What do you recommend - a staged upgrade, or do you think going straight to 1.3.1.2 would be safe? If a staged upgrade is recommended, which specific versions do you suggest for each step?

I do have a test-server installation on which I can try out the upgrade before proceeding to the live server.

ZenPhoto is currently running perfectly, under this setup.

* Zenphoto version 1.2.5 [4022] (Official Build)
* Current gallery theme: grostern_custom
* PHP version: 4.4.8
* Graphics support: PHP GD library bundled (2.0.28 compatible)
* PHP memory limit: (Note: Your server might allocate less!)
* MySQL version: 4.1.22
* Database name: [omitted]
* Table prefix: zphoto_
* Spam filter: simple
* Captcha generator: zenphoto

Active plugins:

* dynamic-locale v1.0.0
* filter-zenphoto_seo v1.0.0
* image_album_statistics v1.0.7.2

Active filters:

* none

Thanks for your help.

Comments

  • There have been a few threads about upgrading from quite out-of-date versions, and it seems that the concensus is to do a staged upgrade. As to which versions you have to use, I have no idea, but doing each one would minimize the risk that something would go wrong.
  • acrylian Administrator, Developer
    In any case we would recommend upgrading or switching your server to PHP 5.2+ and MySQL 5, although we are not striclty PHP 5/MySQL 5 yet we only test on that.
  • Thanks, both.

    We're stuck with the existing PHP & MySQL versions for the time being.

    In terms of the staged upgrade, I'd still be grateful if anyone is able recommend specifically which versions to try. Thanks.
  • Or... would you recommend just sticking to the existing version (1.2.5) since it works fine?
  • acrylian Administrator, Developer
    Well, we did fix and improve a lot of things including security related stuff so we generaly recommend to upgrade (it may work well with php/mysql 4). I would say upgrade each release individually until 1.3. Then an update to the recent 1.3.1.2 will be easier (Note I have not tried this so I am just guessing.)

    However if you don't need newer features and it works well for you, you probably don't need now. I suggest to review our changelog maybe.

    But note that we bascially are only able to support the current release and that upgrade may be more troublesome the longer you wait.
  • Thanks a lot, acrylian, appreciate the suggestions.

    Here's another crazy idea. What if I tried a fresh install of the latest version. If it works, could I import the old data?
  • acrylian Administrator, Developer
    Depends what data you mean. You can copy the content of your root albums folder over but you will loose all data entered to the database like titles, descriptions, tags and such. Except you have stored such data in the EXIF meta data of your images itself.

    You will not be able to just export your database and reimport it because of changes. If you need that a step by step update is your best change. I would actually try that not on the live install if that has important data without a database backup so you could revert to 1.2.5 if it fails!

    Current releases have a database backup utility to make these things easier (since 1.3 I think but don't remember exactly).
  • Ah - by "data" I did mean the old database of images, ZenPhoto descriptions, categories, etc. (We're not using EXIF meta data.)

    Thanks for the clarifications.
  • Zenphoto v1.2.5 does have the backup facility. I would suggest you make a backup using that facility. Import it and your album/image files to a fresh location/install of v1.3.1.2. Do this before your run setup. After setup completes you will be offtered the option of restoring from the backup.

    I suspect you will get some reported errors from the restore as probably some database tables/fields have changed. But there is a good chance the important data will be migrated.
  • Thanks a lot, sbillard. I will try this - if it works, it might save a lot of time vs. doing the step-by-step upgrade. I'll report back in case it helps others.
  • Tried to do a fresh install of 1.3.1.2. Unfortunately I can't even get past the setup screen - I get these warnings, with no option to proceed past it. Is there any way around this?

    PHP version 4.4.8
    Warning!
    Version 5.2 or greater is strongly recommended.

    PHP magic_quotes_gpc [is enabled]
    Warning!
    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.

    PHP gettext() support [is not present]
    Warning!
    Localization of Zenphoto currently requires native PHP gettext() support
    `

    I also get various PHP warnings for fopen, fwrite & fclose.
  • The above warnings (except for the one on the PHP level) are not likely to be the problem. It will be the PHP warnings we will need to know about.

    But maybe the best would be to upgrade your PHP to version 5. We have not tested at all on PHP4 and altough we will not deliberately do something that requires PHP4 since we do not test, such dependencies may sneak in.

    In particular, the Imagick graphics library seems to have problems with PHP4 even though it should not be loading with that version.
  • Hiya, thanks so much for the quick reply. Unfortunately upgrading to PHP5 isn't an option right now, but it will be down the road when we switch servers. Here's an example of the PHP errors:

    Warning: copy(/home/xxxxxx/portfolio2/.htaccess) [function.copy]: failed to open stream: Permission denied in /home/xxxxxx/portfolio2/zp-core/setup.php on line 263
    xxxxxx
    Warning: fopen(/home/xxxxxx/portfolio2/zp-data/setup_log.txt) [function.fopen]: failed to open stream: Permission denied in /home/xxxxxx/portfolio2/zp-core/setup.php on line 54

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/xxxxxx/portfolio2/zp-core/setup.php on line 55

    Warning: fclose(): supplied argument is not a valid stream resource in /home/xxxxxx/portfolio2/zp-core/setup.php on line 56

    Warning: fopen(/home/xxxxxx/portfolio2/zp-data/setup_log.txt) [function.fopen]: failed to open stream: Permission denied in /home/xxxxxx/portfolio2/zp-core/setup.php on line 54

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/xxxxxx/portfolio2/zp-core/setup.php on line 55

    Warning: fclose(): supplied argument is not a valid stream resource in /home/xxxxxx/portfolio2/zp-core/setup.php on line 56

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/portfolio2/zp-core/setup.php:263) in /home/xxxxxx/portfolio2/zp-core/setup.php on line 294
    Zenphoto Setup
  • These are basically file permissions errors. Setup is trying to do things like create the .htaccess file and open/write to the setup log. Check the permissions on the zp-core folder and the zp-data folder.
  • kp Member
    Thanks - I'll check permissions and try again.
  • kp Member
    OK, I've gotten rid of the PHP errors, but I still don't see a way to get past the other warnings - what am I missing? There's no submit button or setup link to continue the process. I've tried both Firefox & Safari.

    This is all that's on the page now:

    Welcome to Zenphoto! This page will set up Zenphoto on your web server.
    Systems Check:

    * PHP version 4.4.8
    Warning!
    Version 5.2 or greater is strongly recommended.
    * PHP Safe Mode
    * PHP magic_quotes_gpc [is enabled]
    Warning!
    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.
    * PHP gettext() support [is not present]
    Warning!
    Localization of Zenphoto currently requires native PHP gettext() support
  • kp Member
    Hey there, here's a possible clue for this mystery - when I view the source for the setup page, it looks like the page hasn't completely been displayed. It ends here:

    `

    Warning!

    Localization of Zenphoto currently requires native PHP gettext()support

    `

    ... with no closing body or html tags. Any ideas?

  • acrylian Administrator, Developer
    It might be releated to a bug with the Imagick libary function which require PHP 5 and cause this even if you don't have it all. You really should try to get your host to upgrade to PHP 5...

    The nightly has it corrected I think but we are doing some interal restructuring right now that might still have some minor issues.
  • acrylian Administrator, Developer
    It might be releated to a bug with the Imagick libary function which require PHP 5 and cause this even if you don't have it all. You really should try to get your host to upgrade to PHP 5...

    The nightly has it corrected I think but we are doing some interal restructuring right now that might still have some minor issues.
  • It is probably the Imagick issues. Please apply these changes http://www.zenphoto.org/trac/ticket/1626
  • kp Member
    Thanks, that's awesome. Will try those patches.
  • kp Member
    I uploaded those two patched files but unfortunately the page still won't fully load. I even tried a third browser (Safari) to make sure nothing was caching, but no go.

    Thanks anyway...

    > You really should try to get your host to upgrade to PHP 5...

    I'm on a dedicated server with a bunch of legacy custom-programmed software, so unfortunately we are stuck with PHP4 for the time being. Hope to move servers in the next 6 months.
  • acrylian Administrator, Developer
    I understand the reasons to stay on php4, no problem. For that reason my host allows switching php4/5 via htacces for directories. Maybe yours does as well?

    If the page does not fully load you probably have some error in your log.
  • kp Member
    There is no PHP5 available, it's my own dedicated server, I'm my own host, so I know this for a fact. ;-)

    > If the page does not fully load you probably have some error in your log.

    Thanks, I'll check the log.
  • kp Member
    Just checked the error log - unfortunately there are no errors of note. I really appreciate all your help. Open to any other brainwaves that you may have. Thanks again.
  • Where does the page load stop?
  • kp Member
    It stops after this piece of code:

    <h1>Warning!</h1>
    Localization of Zenphoto currently requires native PHP `gettext()` support </div>
  • The next item Setup checks is the mb_string support. So I would presume there is somethign wrong there. But for the script to stop at that point there had to be a PHP failure of some sort. Perhaps PHP has just stopped without reporting an error, but that is unlikely. There really should be an error logged somewhere.

    I guess I would check the configuration of Multibyte String Functions and iconv Functions. Also check your character set setting.
  • kp Member
    Hi there,

    charset: UTF-8 Unicode (utf8)

    In terms of iconv - not sure how to check our specific configuration, but I did find this: "Since PHP 5.0.0, this extension [iconv] comes with various utility functions that help you to write multilingual scripts."

    At this point, I'm going to assume that ZenPhoto in its current version just is no longer compatible with PHP4.

    Thanks again for all your help, it's been appreciated.
  • Perhaps not with the configuration of PHP4 that you are running. Certainly we have not tested that. But it does work with PHP4 on my server. Iconv was certainly present on PHP4 and Zenphoto's use of it has not changed.

    Anyway, since things are stopping, one of two things is happening. Either there is a PHP error, in which case it should be logged somewhere; or PHP itself is stopping because of some internal issue, probably configuration related.
Sign In or Register to comment.