Page 1 of 1

php warning in /system/library/cache/file.php on line 32

Posted: Tue Apr 03, 2018 5:13 pm
by opensab677
in my error log file:
2018-04-01 15:25:33 - PHP Warning: fread(): Length parameter must be greater than 0 in ......./system/library/cache/file.php on line 32.
So do I have to change something at line 32?
thanks

Re: php warning in /system/library/cache/file.php on line 32

Posted: Tue Apr 03, 2018 7:13 pm
by straightlight
Download this file from Github: https://github.com/opencart/opencart/bl ... e/file.php and clear your OC cache from the OC admin afterwards: viewtopic.php?f=176&p=718325#p718325 . See if that rectifies the issue.

Re: php warning in /system/library/cache/file.php on line 32

Posted: Thu Sep 12, 2019 1:55 pm
by Fabienlolo
OC: 3.0.2
theme: journal 2
url: www.vacacionandocancun.com/tours/
Hi,
just got the message in title on my OC website. Is the solution still valid for my own OC version?
It is not clearly mentioned but i guess, once you download the file, you just replace the older "file.php" one by this new one right? In /system/library/cache/?
So thanks to anyone who can confirm if the github file is the one for my OC version, and if i just replace it in my OC file system.
And if someone could tell, what may have fired up this warning as i have no clue, it would be great.
Thanks anyone again for you support

Re: php warning in /system/library/cache/file.php on line 32

Posted: Fri Sep 13, 2019 3:16 am
by Fabienlolo
Hi,
it seems that my problem got solved just as it appeared, all by itself. I guess it was server related, as did nothing about it apart from posting it here. I was about to install the "file.php" file from github mentionned in previous post, but when i checked the page again before doing it, it was all back to normal.
I am not sure i should add SOLVED in the title as i did not make any changes in my OC, and that it is not clearly written what to do with the github file even though it seems without saying. I believe what goes without saying, goes better saying it. Or writing it here in our case.
If anyone have an idea of what may fire up this warning, it could be some help i guess.
Cheers, and all the best for this OC community. Lots of sells.

Re: php warning in /system/library/cache/file.php on line 32

Posted: Tue Aug 25, 2020 3:25 am
by CarlFogarty
this might be helpful for someone

I had this error on v3, and it turned out that I was generating backups on of the site and the server ran out of space. When I deleted the older backups to create space the error went away.

Re: php warning in /system/library/cache/file.php on line 32

Posted: Fri Aug 09, 2024 7:06 pm
by siteadvice
As stated above, check your storage quota hasn't been exceeded.