Zenphoto instance inaccessible after upgrading PHP Version

I upgraded the PHP Version on my server from 7.4 to 8.2. The server also runs/ran a Zenphoto 1.4.12 instance. As of right now, the instance displays a white page. I looked into /zp-data/debug.log, but the log ends before the PHP upgrade. I can not downgrade PHP below 8.0 per my hosts security guidance. I already tried PHP 8.0 as well.

I have a few questions:

  • Is it quicker just setting up Zenphoto new and import my old gallery? I realize I would use my tags.
  • If this is fixable, where would I start?

Comments

  • acrylian Administrator, Developer

    I upgraded the PHP Version on my server from 7.4 to 8.2. The server also runs/ran a Zenphoto 1.4.12 instance. As of right now, the instance displays a white page.

    Well, you haven't updated your install for nearly 9 years so that is to be expected. 1.4.12 is not compatible with PHP 8+.

    Two options.

    1. Recommended way: Downgrade your server PHHP so the old install works again. Then upgrade step by step and review the changelogsg on our site.
    2. Upload the current install over tthe old install. The upgrade might generally work but leaving out that much updates is not tested.

    See the installatio page on our site for info.

    In any case if you use custom code and/or third party theme/plugins make sure there are updates so that still works. And naturally do backups before that

  • jacenat Member
    edited January 27

    Yes, I am aware this is fully on me. This is just a hobby site, so the impact really is not severe. I already spun up a new 1.6.5 instance and imported my gallery. I will probably just go ahead from there.

    Just for fun, I will try overwriting the old instance, and will report with findings. I don't expect it to work, so every result is just positive :)

    Thanks for getting back!

  • acrylian Administrator, Developer

    Probably will work fine. I did upgrade very old installs successfully even with custom themes (well, which I made). But we can just not guarantee it generally as every install is different.

  • jacenat Member
    edited January 27

    Alright, that actually did work.
    In the admin page, it now tells me a bunch of scripts have been changed and of course that I should run setup.

    When I do run setup, the website throws an http 500. I can still log into the backend, but of course the message remains.
    debug.log doesn't show any setup related entries, only that zpFormattedDate is deprecated.
    setup.log actually is not updated when I click the button in the backend.
    I checked in /zp-core/setup/ and all files are .xxx and haven't been changed since I pressed the button in the backend.

    I am running MySQL 5.7 still. Is that why setup fails? Shouldn't it at least unprotect the setup files before?

    Since I am in deep anyway, I will try to rectify issues now and not leave the instance in a "broken" state if I can manage that.

    /edit: going to /zp-core/setup.php and running that has the same behaviour of course. And if I can't figure that stuff out, I will probably set up a new instance on the side and just migrate over more slowly now :)

  • acrylian Administrator, Developer

    There is a button on the overview page to unprotect the setup files if it doesn't happen automatically. The xxx suffix is to protect them from being unwantedly executed by for example an intruder.

    You will see that setup note more often. It is just a note that also appears if for example something on the server changes like PHP or MySQL version. That might affect something but we cannot know if so you know about it. Running setup again just updates the internal catalogue in this case and does normally not "reinstall" anything.

    MySQL 5.7 is totally fine. We haven't really tested MySQL 8 as we currently sadly have no real way to test it. Our local server tool is buggy in the latest version with it and our own server uses MariaDB.

  • Okay. Unfortunately, even unprotecting the setup files (which does work, as I can see in the renamed files in /zp-core/setup/) still gives me an http 500 when running /zp-core/setup.php or /zp-core/setup/index.php

    Good to know about MySQL 5.7.

    Thanks for the help. I'll leave it at that for now and might transition over to a clean install over the next couple of weeks.

  • acrylian Administrator, Developer

    You probably have wrong file/folder permissions, perhaps too strict as not every server works with that. https://www.zenphoto.org/news/permissions-for-zenphoto-files-and-folders/

Sign In or Register to comment.