Browsing album on Edit Album screen updates image date

Hi,
We’re in the process of moving our Zenphoto 1.5.2 install from Red Hat Enterprise Linux 7.6, MariaDB 5.5.60, PHP 7.3.5 to a newer server running Red Hat Enterprise Linux 7.7, MySQL 8.0.17, PHP 7.3.8. Only one problem: We store an image-specific date manually entered on the Edit Album/Images tab using the date picker. I believe this is stored in zp_images.date. The strange thing is that on the new server, when we browse the Edit Album/Images tab, all the dates for those images change from their original values to a new date. Most of the time, the date is changed to 2019-08-05 16:26:ss (but there are other dates as well). I don’t know the significance of that 2019-08-05 date, except that it is near to when I copied the files over from the older server. Just viewing the images triggers the date to change. I can query zp_images to see that images that have not yet been viewed retain their original date. Any idea how to prevent this?

Comments

  • acrylian Administrator
    edited August 7

    If I understand correctly you moved the whole install. Did you follow the correct order of doing so as explained here?:
    https://www.zenphoto.org/news/moving-and-changing-existing-installations/

    If you didn't follow this order, the images are considered newly discovered from the file system and the date will be updates.

    In short: First copy the albums physically, They must be present when you import the database backup so they are not newly discovered.

  • Thanks for your reply. Yes, I had copied the files first (and started over from scratch just to be sure). I was able to figure out the problem. When I moved servers previously I had always copied the images using a Mac desktop FTP client. This time I used scp to copy server-to-server. Turns out the Mac client preserved access and modified dates and scp did not. That was the cause of the problem. Using scp with -p also preserves the modified date and that works fine as well. In that case, Zenphoto uses the date from the database (which is different from the access, modified and change dates). I noticed that if the file is modified after the database restore, then naturally Zenphoto updates the Date field with the modified date. All is well, thanks for your help!

  • acrylian Administrator

    Great you figured it out. Thanks for the update.

Sign In or Register to comment.