Random error during showing photos in Album photos.

Ondrej Janicko Posted in Technical Support 8 years ago

I discovered that when I play photos from created Album Photo in Profile sometimes photo does not show.

I have switched on error loging and this errror accured:

[20-Jun-2017 14:18:38 America/NewYork] PHP WARNING: 2017-06-20 14:18:38 (EDT): "exifread_data(phpCsv2kO): File not supported" in file /var/www/html/pg/classes/OssnFile.php (line 452)

I know that not evry photo has correct exif but it should be corected with OSSN. Sometimes that photos are showing. It is random.

Replies
Slovak Ondrej Janicko Replied 8 years ago

Now I tested what you written Zet Man about getting an error message WHENEVER I am going to upload images of different type and you are RIGHT.

Maybe the error what I reported was really because I try to upload gif image.

So, the random not showing images from Photo ALbum does not have an error log error and that it maybe you are correct that server has temporary problems to deliver the requested images.

OK. When I come to the problem again I will open browsers development console and I will check the apache codes.

Thanks for your answers.

Slovak Ondrej Janicko Replied 8 years ago

In http://php.net/manual/en/function.exif-read-data.php is writen:

EXIF headers tend to be present in JPEG/TIFF images generated by digital cameras, but unfortunately each digital camera maker has a different idea of how to actually tag their images, so you can't always rely on a specific Exif header being present.

Slovak Ondrej Janicko Replied 8 years ago

The error occured on my installation of PostgreSQL fork of OSSN 4.4, but I think it does not have relation with database.

The line of error implies of rotation and orientation of image in OssnFile.php.

I tested only jpg files downloaded from internet. So the jpg format was correct but who knows about correct exif.

It occured randomly. Sometimes I play photos from some Photo Album and evrything is OK and all photos are shown correct.

I do not think that it is problem of temporary server delivery because in error log apeared an particular error.

I think it is problem with incorrect exif in photo and php exif-read-data function does not processed the photo. It sholud be no error in OSSN but it should be treated if exif fails.

I writte just for your information, the problem is not so bad and we can live with it. :-)

German Michael Zülsdorff Replied 8 years ago

http://php.net/manual/en/function.exif-read-data.php:

Please note that exifreaddata() only supports jpeg and tiff images!

As a result, you'll get an error message like yours WHENEVER you are going to upload images of a different type (like .png and .gif)

Thus, your error line has no relation to the issue you reported. It's more likely that your server has temporary problems to deliver the requested images. Open your browsers development console and check the apache codes you're getting on that files.

Indonesian Arsalan Shah Replied 8 years ago

Is the error also cause on fresh installation of OSSN on MySQL DB?