Album does not have images (suddenly)

For 6 months, all has been great! Suddenly (after upgrading to php 7.4) no images show and I get the message "Album does not have any images" when I try to refresh the cache.

I tried dropping back to php 7.2 and boom - images are showing again!

Upgrade to 7.3 - images vanish.

I have made sure all my php settings match the troubleshooting guide.

Where else should I look?

Comments

  • acrylian Administrator, Developer

    Review the Zenphoto debug log and if you have acccess your server's PHP error log please.

    Also which Zenphoto version are you using? IF not the latest 1.5.9 please update.

  • 1.5.9 is the version, here is the zenphoto debug log.

    The first two entries seem to repeat over and over today after I did the update. The last one is after going back to 7.2.

    {29754:Wed, 04 May 2022 12:04:04 GMT}
      NOTICE: Trying to access array offset on value of type bool in /home/jgoniaphoto/public_html/client/zp-core/class-image.php on line 606
      Image->updateDimensions called from Image->getHeight (class-image.php [649])
        from Image->getThumbDimensions (class-image.php [673])
          from Image->getThumbHeight (class-image.php [699])
            from getSizeCustomImage (template-functions.php [2695])
              from getSizeDefaultThumb (template-functions.php [3003])
                from printAlbumThumbImage (template-functions.php [1798])
                  from include (album-grid.php [57])
                    from include (album.php [9])
                      from include (index.php [130])
                        from index.php [56]
    {29754:Wed, 04 May 2022 12:04:04 GMT}
      NOTICE: Trying to access array offset on value of type bool in /home/jgoniaphoto/public_html/client/zp-core/class-image.php on line 607
      Image->updateDimensions called from Image->getHeight (class-image.php [649])
        from Image->getThumbDimensions (class-image.php [673])
          from Image->getThumbHeight (class-image.php [699])
            from getSizeCustomImage (template-functions.php [2695])
              from getSizeDefaultThumb (template-functions.php [3003])
                from printAlbumThumbImage (template-functions.php [1798])
                  from include (album-grid.php [57])
                    from include (album.php [9])
                      from include (index.php [130])
                        from index.php [56]
    {32380:Wed, 04 May 2022 12:09:52 GMT}
      WARNING: count(): Parameter must be an array or an object that implements Countable in /home/jgoniaphoto/public_html/client/zp-core/admin-functions.php on line 538
      customOptions called from admin-options.php [2017]
    
  • acrylian Administrator, Developer
    edited May 2022

    Hm, seen this one before. I see an album-grid.php mentioned which indicates that you are using a third party theme. Which one is that?

    1.5.9 itself should be compatible with PHP up to 7.4.x. Please also try one of the included themes. If the issue does not appear, it may be the theme.

  • I am using zpBase as my theme.

    I tried switching to Basic and immediately lost all the images again when I went to php 7.4

  • acrylian Administrator, Developer
    edited May 2022

    I am sorry, no actual idea. It for sure works with PHP 7.4 as you can see on our demo: https://demo.zenphoto.org/

    I think zpBase should actually work, although we only maintain it on request.

  • jfirestone Member
    edited May 2022

    So strange. I just tried making a subdomain, setting it up on php 7.4 before installing zenphoto (basic theme) to see if there is a difference. There is not. I must be missing something. How could it work on one server on php 7.4 but not on another?

    The files NEVER load into the cache folder - maybe that's a clue? It's like zenphoto can't even see that they are there.

  • acrylian Administrator, Developer

    How could it work on one server on php 7.4 but not on another?

    Technically generally sort of yes as PHP can be configured differently and even badly. But that is usually not the case and I am sure not here. I never encountered this on several shared hosts.

    Even if image sizes are not cached you should get some broken images. Perhaps fiel/folder permissions got off as that could explain no cached filed. That sometimes happens if there were server side updates by the host.

    Please re-run setup and report if there is anything noted.

  • jfirestone Member
    edited May 2022

    To add to this, I tried creating a new album and uploading photos to it. During the upload process all the progress bars turn red and say "Error 8" on them. I searched this site but that didn't come up with anything.

    The photos load in the /albums/albumname folder. The albumname appears in the /cache/ folder, but the images are not there.

    The /cache/ folder is set to 755.

  • jfirestone Member
    edited May 2022

    I went to run setup like you said - and check out this warning!

    PHP graphics image support
    Error!
    Your PHP graphics library does not support JPEG, GIF, or PNG
    The unsupported image types will not be viewable in your albums.
    To correct this you need to install GD with appropriate image support in your PHP

    I am on a VPS but this appears as though it's something my host might need to fix and likely the answer to my problem.

    EDIT: I bet that is exactly the issue. When I switch back to 7.2, that error message vanishes.

  • Furthermore - running phpinfo on 7.2 reveals the GD library section and all ok.

    7.4 running phpinfo doesn't have ANY GD library section.

  • acrylian Administrator, Developer

    Yes, that's it. Your webhost somehow compiled PHP 7.4 incompletely without any graphics support.

  • Boom - that was it. They installed my GD Library and all is working now.

    Thanks so much for helping me find and fix the issue!

  • acrylian Administrator, Developer

    Great, thanks for the follow up!

Sign In or Register to comment.