-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Oclass 5.0.1 & Osclass 5.1beta2 -PHP Notice: getimagesize(): Read error! #370
Comments
@navjottomer Is there ANY possibility this to come from the 5 core? |
Yes, it is coming from osclass but nothing wrong with the code there. |
Well it happens a lot i think and i see now a new error:
|
once or 10 times a day is not suspicious on a running site, some image files have encoding issues and can cause these Notices. I'll check the last error. |
Ok, you know better, still this is a new error that i have never seen before. We will see how it goes. |
This seems not to go away. In all 5 sites. |
ok, i'm reopening this since i have a lot of them, in all sites, and also a NEW one related to this:
This:
is something i have reported back and closed the issue the "is a directory" part. probably something is wrong in that code. And i think this is also more detailed because i switched the site to PHP 7.4.x. |
@navjottomer Until this is debuged and fixed, do you know if it does pose any image issues when posting or any other? I haven't found any, still i dunno when it happens ... |
These are PHP NOTICES they rarely create issues, But it's hard to debug without reproducing. If you're using an ajax uploader, try to disable that and see if this error is reduced. |
@navjottomer So if i understand correctly you do not see those on your website? Or anybody else in his site? If so, then it could be the theme i use (Osclasswizards)? |
I tried to upload high rez images, no issues or no errors. I tried to upload a corrupted image and i got hxr error 500 and some error log about "PHP Warning: getimagesize(): corrupt JPEG data" and an exception. Nothing to do with the original error i posted. So i guess this error doesn't happen when a poster uploads an image. |
I have enabled the "keep original images" so i can check if those are special or something. |
In few days I'll upload the first beta of 5.1 from develop branch, it will fix many bugs, I hope it'll be resolved. |
After some changes in Media max size to 16384 at Osclass and PHP and also PHP max_post_size to 32mb, it has been 3 days without that error (5.0.2). |
I'm closing this since i do not see it any more, with 5.0.1 or 5.1 but i will keep an eye open. If anybody will experience this, he can check the php options allowed sizes and also Osclass media sizes. |
I spoke toooo soon. [24-Sep-2021 06:49:14 Europe/London] PHP Notice: getimagesize(): read of 8192 bytes failed with errno=21 Is a directory in /home/oc-includes/osclass/classes/actions/ItemActions.php on line 346 [24-Sep-2021 06:49:14 Europe/London] PHP Notice: getimagesize(): Read error! in /home/oc-includes/osclass/classes/actions/ItemActions.php on line 346 5.0.2 |
This is not fixed, at least not in my system (live 5.1beta2 from develop branch). 2021-09-30 11:12:17 - NOTICE: getimagesize(): read of 8192 bytes failed with errno=21 Is a directory in /home/**********com/public_html/oc-includes/osclass/classes/actions/ItemActions.php on line no 309 Error Code:8 2021-09-30 11:12:17 - NOTICE: getimagesize(): Read error! in /home/**********com/public_html/oc-includes/osclass/classes/actions/ItemActions.php on line no 309 Error Code:8 |
Recent commits will fix or minimize these warnings. |
Just pls leave this open for a while, i'm uploading today's develop branch to a live site and i will update here in 2-3 days from now. |
Not fixed yet. I already had 5 in less than an hour. I think this doesn't come from new ads image uploading. Because the last hour, i had NO ads posted. It must come (for some reason) from user profiles. Also the timing of Notices below maybe mean something. 2021-10-04 14:57:50 - NOTICE: getimagesize(): read of 8192 bytes failed with errno=21 Is a directory in /home/oc-includes/osclass/classes/actions/ItemActions.php on line no 312 Error Code:8 2021-10-04 14:57:50 - NOTICE: getimagesize(): Read error! in /home/oc-includes/osclass/classes/actions/ItemActions.php on line no 312 Error Code:8 2021-10-04 14:57:53 - NOTICE: Undefined index: en_US in /home/oc-content/themes/osclasswizards/user-profile.php on line no 139 Error Code:8 2021-10-04 14:57:53 - NOTICE: Trying to access array offset on value of type null in /home/oc-content/themes/osclasswizards/user-profile.php on line no 139 Error Code:8 2021-10-04 14:57:55 - NOTICE: Undefined index: en_US in /home/oc-content/themes/osclasswizards/user-profile.php on line no 139 Error Code:8 2021-10-04 14:57:55 - NOTICE: Trying to access array offset on value of type null in /home/oc-content/themes/osclasswizards/user-profile.php on line no 139 Error Code:8 |
You need to deep debug this issue, all the way up in the code for image processing. What happens with images on those items that have this warning? Are they properly processed and shown? Is everything otherwise all right? Or the images are missing? New devices use newer compression algorithms and features for images (namely, JPEG), which might not be fully supported yet by GD/imagick. You mentioned you keep originals, it would be smart to test them on different systems and examine their format closely. For e.g. older image viewers cannot open some pictures from new phones, despite having jpeg extension, it's not the problem in extension itself, but the file content / structure. If the image is not properly recognized, it could generate null object, hence this warning. I hope I'm wrong, though. |
It's definitely from the theme, then. And it could be not just for the image, but also other User fields. |
Well, i have tried to replicate this, making a user and uploading whatever i could as ads images. No errors. JPG,Jpeg, PNG, you name it. Also note that i NEVER had this issue before (with 3.9 and an other release channel 4.4) |
One last thing i want to try is to switch to GD lib instead of Imagik. Does that make any sense? |
That shouldn't fix this issue according to your latest description and debug log. It's not related to image processing during item post/edit, but from other sections (e.g. user profile image, and user profile fields). |
Maybe someone who knows and has little time to devote, could bring OsclassWizards back to life for Osclass 5.x and also do the same for some Drizzle themes i see for free here: https://osclasscommunity.com/themes/ Otherwise it will take a lot of time (if ever) to have a good installed base for 5, without themes (and plugins) free or paid. |
@navjottomer Feel free to close this issue (if you want to do so). I can't spend any more time for it and apparently you did your best. We will see in in time when more people will be using vs 5.x. |
What code is on line 139 in your theme? Try removing it and observe the log. |
Line 139 is:
and has 3 notices !! |
I tried to fix this as much as possible, but there is no way to be sure as I can't reproduce this error in any way. BTW it's a PHP Notice, it is not preventing the script to run normally, so we can ignore it till someone found a way to reproduce it. |
Ok, i think i found it. it has to do with the GRAVATAR photo of the profile. |
Osclass 5.0.2 and PHP 7.3.x
Several of those:
PHP Notice: getimagesize(): Read error! in /home/oc-includes/osclass/classes/actions/ItemActions.php on line 346
Just updated the theme and may/could be the source of it.
The text was updated successfully, but these errors were encountered: