[SOLVED - SEE MY LATEST COMMENT FOR HOW I RESOLVED THIS ISSUE].
Hello guys,
Hope you have a great day!
I've been trying to set up Opencart 3.0.3.7 (PHP v. 7.3) shop to test one of my company's plugins but after the fact that I finished the installation process, I managed to view admin start page once and as soon as I clicked on Extension installer, I started to receive an error message below:
"Warning: fclose() expects parameter 1 to be resource, bool given in .../web/Opencart3037/system/library/log.php on line 25"
I searched both web and forums for any possible solutions but so far none of them have worked (change permissions, move storage folder, change DIR_STORAGE path, etc.) so here I am, hoping that someone will at least push me in the right direction to resolve this error.
I know there have probably been other posts about this but none really have helped me so I had to create my own.
Opencart is plain, no extensions, it's not a Journal. If you wish to see more info or any file contents, etc, let me know, I'll try my best to provide what I can!
P.S. Could this error be connected to server's firewall? Because that would make sense to me.
Thanks!
Hello guys,
Hope you have a great day!
I've been trying to set up Opencart 3.0.3.7 (PHP v. 7.3) shop to test one of my company's plugins but after the fact that I finished the installation process, I managed to view admin start page once and as soon as I clicked on Extension installer, I started to receive an error message below:
"Warning: fclose() expects parameter 1 to be resource, bool given in .../web/Opencart3037/system/library/log.php on line 25"
I searched both web and forums for any possible solutions but so far none of them have worked (change permissions, move storage folder, change DIR_STORAGE path, etc.) so here I am, hoping that someone will at least push me in the right direction to resolve this error.
I know there have probably been other posts about this but none really have helped me so I had to create my own.
Opencart is plain, no extensions, it's not a Journal. If you wish to see more info or any file contents, etc, let me know, I'll try my best to provide what I can!
P.S. Could this error be connected to server's firewall? Because that would make sense to me.
Thanks!
Last edited by Gruzhyy on Tue Jun 22, 2021 4:05 pm, edited 1 time in total.
Check your system/library/log.php against the original. There is no fclose() on line 25.
https://github.com/opencart/opencart/bl ... ry/log.php
https://github.com/opencart/opencart/bl ... ry/log.php
That is because I deleted comments within the file before for some reason.ADD Creative wrote: ↑Tue Jun 22, 2021 7:12 amCheck your system/library/log.php against the original. There is no fclose() on line 25.
https://github.com/opencart/opencart/bl ... ry/log.php
Nothing much changes if I reverse it back to the original - only that the error happens on line 39.
Well the quick fix is to downgrade PHP version to 7.2, or debug by changing file permissions
chmod 777 system/storage/logs/error.log
chmod 777 system/storage/logs/ocmod.log
chmod 777 system/storage/logs/openbay.log
chmod 777 system/storage/logs/error.log
chmod 777 system/storage/logs/ocmod.log
chmod 777 system/storage/logs/openbay.log
For further assistance with Opencart Development you can reach me at
asktofaizan@gmail.com | https://asktofaizan.com |
Hi,faizanyasn wrote: ↑Tue Jun 22, 2021 1:58 pmWell the quick fix is to downgrade PHP version to 7.2, or debug by changing file permissions
chmod 777 system/storage/logs/error.log
chmod 777 system/storage/logs/ocmod.log
chmod 777 system/storage/logs/openbay.log
Thanks for your reply. I managed to resolve the issue by simply re-installing Opencart in a different folder and managing permissions before I go thru with it.
And side note - I tried installing on PHP 7.2 server the first time and it returned me a message that Opencart 3.0.3.7 requires 7.3+ version.
This is resolved, thankfully, thanks for those who shared with their opinion and possible solutions. Cheers!
You should not do this for security reasons.faizanyasn wrote: ↑Tue Jun 22, 2021 1:58 pmchmod 777 system/storage/logs/error.log
chmod 777 system/storage/logs/ocmod.log
chmod 777 system/storage/logs/openbay.log
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Guru Member
To debug i asked for changing permission
For further assistance with Opencart Development you can reach me at
asktofaizan@gmail.com | https://asktofaizan.com |
CHMOD 0755 recursive settings should be used on folders and CHMOD on files should not be modified (by FTP without failure during process).
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: niagato, Semrush [Bot], thomas_1989 and 638 guests