Topic: Images suddenly not visible

Hello,

I'm maintaining a Showkase site for my dad's artwork.  It was installed as V1.7.6 in 2023 and has been working fine until just recently.  Suddenly all the photos are black on the site, and no thumbnails show in the libraries.  The files themselves are still in the correct directories and still viewable from the CPanel file manager.

In addition I cannot upload a new image.  The uploader acts like it's working, but at bottom it says 0/1 uploaded and the files do not appear in the library OR in the actual directories.  I read a few other entries that sounded similar but I have already installed the php patches and nothing changed.  No error messages.

I'm still suspicious of a php issue because it seems like this started just after the recent php security alert and my hosting company upgraded all the versions.  I believe the site is currently using 8.3.36.  Any ideas?

Thanks much!
-- Eric

Re: Images suddenly not visible

As long as you have installed the patch (here), your Showkase site should be compatible with all versions of PHP from 7.1 to 8.5 (inclusive).

However, when your web host upgraded PHP, some PHP settings might also have changed that could potentially account for the issues that you are experiencing.

Please try installing the patch again (make sure that you apply it to the correct directory and that it overwrites existing files) as you'll definitely need it for PHP 8.3.6.

Also, try running Showkase in debug mode to see if any detailed warning or error messages are displayed in the Showkase status bar.
Open your 'showkase/admin/settings/constants.php' file in a plain text editor and change line 12 from:

define('DEBUG', false);

... to:

define('DEBUG', true);

This should hopefully help to track down the exact cause of the problem.

If you like, please post the URL to your Showkase site (or email it to me at steven@juicebox.net) and I'll take a look at the site and try to figure out what's going on.
Thank you.

Re: Images suddenly not visible

Hi Steven,

You seem to be the lone support person here, so thanks for the prompt reply!  I re-installed the patches.  This did not bring back the images or thumbnails, but now I can upload new images normally.  They show up in the library where they were uploaded, and also in the Cpanel directories.  And thumbnails were generated.

I also turned on debug mode but have not seen any messages anywhere.  Where should they appear?  And would there be any message for normal operation as well as errors?

The site is stanwenocurart.com. Looking at the page HTML I can see that it's inserting the gallery.  It's like there's some problem accessing the actual image files.  But I don't have the HTML knowledge to figure out more than that!

One question (may not have anything to do with this problem):  When I look at the Images directory for a particular page the image files are present, and there are also sub-directories called Large and Small.  In some cases the same image files are listed in the Large directory (or a subset of those files).  But the directory is only 4KB, so I'm guessing those are just pointers?  What are Large and Small directories for?

-- Eric

Re: Images suddenly not visible

... thanks for the prompt reply!

You're welcome!

... but now I can upload new images normally.

That would certainly indicate that the patch has been applied successfully.

Where should they appear?

If you log into the live demo (here), any error would appear in the status bar where the text "This is a demonstration version of Showkase. Some functions are disabled and changes will not be saved." appears in the demo.)

And would there be any message for normal operation as well as errors?

No. Only errors would be displayed here. In debug mode, if everything runs normally (without any errors), you'd see no difference than when running in normal (non-debug) mode.

... there are also sub-directories called Large and Small.

This support page (Multi-Size Image Support) should help explain the existence of Large and Small folders.
You can use Large and/or Small images in a Juicebox-Pro gallery within Showkase by going to 'Site -> Customize Viewers -> Juicebox-Pro (Edit) -> Multi-Size Images (Pro)' in the Pro Viewer Options section.

With regard to your image problem, I see the same problem on your TEST page (which is just a ListViewer gallery with a single image embedded on your web page with a regular HTML <img> tag) so the problem does not seem to be directly related to Juicebox-Pro, and probably not Showkase either.

The image is present on your web server and I can view it directly in my browser, just not when it is embedded in a web page. (Likewise for all your Juicebox-Pro gallery images).
Something on your web server (perhaps a security setting or hotlink protection) seems to be blocking images from being displayed on web pages.

I think the best course of action would be to contact your web host and ask them why the image in your ListViewer gallery does not show up. (This takes away the complexity of the Juicebox-Pro gallery and should be easier for them to troubleshoot.)
It's probably just a single server-side setting but it would likely be quicker to ask your web host about it than search around and try to resolve it yourself.

I hope this points you in the right direction.
Please let me know how you get on. Thank you.

Re: Images suddenly not visible

Steven, you called it!  I decided to look at security settings and sure enough CPanel has a function called Hotlink Protection that is supposed to prevent sites from directly linking to files on my server (or something to that effect).  It was enabled for stanwenocurart.com, turning it off brought the images back!  You can enable the protection for the whole server, and then selectively allow hotlinks for specific domains, and for some reason the only one allowed was another site I run.  I don't know how it got that way, I've never looked at this before.

Interestingly, my wife's photo site (imageslostandfound.com) was not affected.  Hers is a Wordpress site so I guess the images are in the WP database, not retrieved from a directory.

Thanks much for the help!

Re: Images suddenly not visible

That's great! I'm glad you've been able to resolve your problem.
Thank you for letting me know. It's most appreciated.
I hope things run more smoothly for you from now on.