Post by Gruzhyy » Mon Jun 21, 2021 9:32 pm

[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!
Last edited by Gruzhyy on Tue Jun 22, 2021 4:05 pm, edited 1 time in total.

Newbie

Posts

Joined
Mon Jun 21, 2021 9:18 pm

Post by ADD Creative » Tue Jun 22, 2021 7:12 am

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

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Gruzhyy » Tue Jun 22, 2021 1:49 pm

ADD Creative wrote:
Tue Jun 22, 2021 7:12 am
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
That is because I deleted comments within the file before for some reason.
Nothing much changes if I reverse it back to the original - only that the error happens on line 39.

Newbie

Posts

Joined
Mon Jun 21, 2021 9:18 pm

Post by faizanyasn » Tue Jun 22, 2021 1:58 pm

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

For further assistance with Opencart Development you can reach me at
asktofaizan@gmail.com | https://asktofaizan.com |


Newbie

Posts

Joined
Tue Jan 12, 2021 2:28 pm

Post by Gruzhyy » Tue Jun 22, 2021 4:03 pm

faizanyasn wrote:
Tue Jun 22, 2021 1:58 pm
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
Hi,
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!

Newbie

Posts

Joined
Mon Jun 21, 2021 9:18 pm

Post by paulfeakins » Tue Jun 22, 2021 6:28 pm

faizanyasn wrote:
Tue Jun 22, 2021 1:58 pm
chmod 777 system/storage/logs/error.log
chmod 777 system/storage/logs/ocmod.log
chmod 777 system/storage/logs/openbay.log
You should not do this for security reasons.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by faizanyasn » Tue Jun 22, 2021 7:07 pm

To debug i asked for changing permission

For further assistance with Opencart Development you can reach me at
asktofaizan@gmail.com | https://asktofaizan.com |


Newbie

Posts

Joined
Tue Jan 12, 2021 2:28 pm

Post by straightlight » Tue Jun 22, 2021 8:32 pm

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


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 102 guests