Invalid File Size Invalid File Size
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Invalid File Size

Started by sjj1805, August 03, 2024, 07:06:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sjj1805

on Some of my albums, some of my images when viewed from the thumnail view but not all will come up with an error message
"Fatal error: Uncaught Error: Call to undefined function validSize() in M:\inetpub\wwwroot\cphoto\include\makers\gps.php:276 Stack trace: #0 M:\inetpub\wwwroot\cphoto\include\exif.php(776): parseGPS() #1 M:\inetpub\wwwroot\cphoto\include\exif.php(979): read_entry() #2 M:\inetpub\wwwroot\cphoto\include\exif_php.inc.php(48): read_exif_data_raw() #3 m:\inetpub\wwwroot\cphoto\displayimage.php(209): exif_parse_file() #4 m:\inetpub\wwwroot\cphoto\displayimage.php(461): html_picinfo() #5 {main} thrown in M:\inetpub\wwwroot\cphoto\include\makers\gps.php on line 276"

If I view the same album with either of the two slideshow options (HTML5 Slideshow) or click the image to view slideshow, then the slideshow plays all of the images
I have discovered that if I remove/rename the Full size Image then the error does not appear and the thumbnail view image displays correctly.

I have compared the full size image dimensions and all are identical, those that display and those that bring up the error.
I have tried resizing the images larger, smaller and nothing cures the problem

I am using an IIS webserver both on Windows 10 and also on another home com,puter with Windows 11.
My version of coppermine is 1.6 which I have kept up to date whenever a message appears telling me that there are updates available.
in the coppermine config I have increased the file size settings to
Max size for uploaded files 4MB
Max width or height for uploaded pictures 4096 pixels

I have run out of ideas to fix what has been working in the past for years.
Any Suggestions anyone?

ron4mac

The error messages reveal that the file include/exif.php is an old version that does not match the version that should be with CPG 1.6.26 (it is from prior to 1.6.16).  You should run the Versionchecker to see what else may not be correct.

sjj1805

An idea sprung to mind and I ask myself why I didn't think of this before.
This "Fix" should cure most of our problems!
My coppermine installation is in a folder I named "Cphoto"
1. Create  new folder on my web server and name it something else. I called this one "Xphoto"
2. Download a clean intallation of coppermine from the coppermine website
3. Copy your "..\include\config.inc.php from the existing folder to the new folder
4. Test and you should find everything works as it should

All that then remains is to restore any modifications yiou may have made to your existing installation - probably best to do one item at a time and check just in case your modification was the reason.

Hopefully this will help others facing seemingly uncurable issues

sjj1805

I forgot to mention, also copy your "Albums" directory over

sjj1805

Quote from: ron4mac on August 04, 2024, 03:53:45 AM
The error messages reveal that the file include/exif.php is an old version that does not match the version that should be with CPG 1.6.26 (it is from prior to 1.6.16).  You should run the Versionchecker to see what else may not be correct.

Yes it was indeed the culprit!
Thank you Ron4Mac
:)