Post by Jonas92 » Wed Apr 13, 2022 5:02 pm

After moving the site to another server, I get a long error message (I will attach below).
After moving the site, I adjusted the config.php files as usual.
I also checked the directories all of these have 777 rights

system / storage / cache /
system / storage / download /
system / storage / logs /
system / storage / modification /
system / storage / session /
system / storage / upload /
system / storage / vendor /
image /
image / cache /
image / catalog /
config.php
admin / config.php

Opencart version: 3.0.3.7
PHP version: 8.0 (the site worked well in this php version before migrating)

How can I solve this problem? The known site was operational before the transfer.


Warning: fopen(/home/[SERVERNAME]/domains/buysmart.lt/storage/logs/error.log): Failed to open stream: No such file or directory in /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/log.php on line 22
Warning: fopen(/home/[SERVERNAME]/domains/buysmart.lt/storage/cache/cache.catalog.language.1649843607): Failed to open stream: No such file or directory in /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/cache/file.php on line 49
Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/log.php:31 Stack trace: #0 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/log.php(31): fwrite() #1 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/framework.php(46): Log->write() #2 [internal function]: {closure}() #3 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/cache/file.php(49): fopen() #4 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/cache.php(53): Cache\File->set() #5 /home/[SERVERNAME]/domains/buysmart.lt/public_html/catalog/model/localisation/language.php(30): Cache->set() #6 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/engine/loader.php(248): ModelLocalisationLanguage->getLanguages() #7 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/engine/proxy.php(47): Loader->{closure}() #8 /home/[SERVERNAME]/domains/buysmart.lt/public_html/catalog/controller/startup/startup.php(54): Proxy->__call() #9 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/engine/action.php(79): ControllerStartupStartup->index() #10 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/engine/router.php(67): Action->execute() #11 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/engine/router.php(46): Router->execute() #12 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/framework.php(169): Router->dispatch() #13 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/startup.php(104): require_once('/home/[SERVERNAME]/do...') #14 /home/[SERVERNAME]/domains/buysmart.lt/public_html/index.php(19): start() #15 {main} thrown in /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/log.php on line 31

Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/log.php:39 Stack trace: #0 /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/log.php(39): fclose() #1 [internal function]: Log->__destruct() #2 {main} thrown in /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/log.php on line 39

Active Member

Posts

Joined
Fri May 26, 2017 3:58 pm

Post by ADD Creative » Wed Apr 13, 2022 6:05 pm

Do your settings in the config.php files match the location on your storage directory?

www.add-creative.co.uk


Expert Member

Posts

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

Post by Jonas92 » Wed Apr 13, 2022 6:09 pm

Yes, I changed the path on the server side. The server also specified that the path was specified correctly, at least on their part.

Active Member

Posts

Joined
Fri May 26, 2017 3:58 pm

Post by ADD Creative » Wed Apr 13, 2022 6:31 pm

Jonas92 wrote:
Wed Apr 13, 2022 5:02 pm
system / storage / logs /

Warning: fopen(/home/[SERVERNAME]/domains/buysmart.lt/storage/logs/error.log): Failed to open stream: No such file or directory in /home/[SERVERNAME]/domains/buysmart.lt/public_html/system/library/log.php on line 22
Your stated location doesn't match the errors. Is your storage directory under system or level with public_html and does your config.php match?

www.add-creative.co.uk


Expert Member

Posts

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

Post by paulfeakins » Thu Apr 14, 2022 7:57 pm

Jonas92 wrote:
Wed Apr 13, 2022 5:02 pm

Code: Select all

/home/[SERVERNAME]/domains/buysmart.lt/storage/logs/error.log

Code: Select all

No such file or directory
That tells you what you need to know.

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 piercedviking » Thu May 26, 2022 2:23 am

I am getting similar issues to this, i screen shot the part where it asked to move files and also the errors i now get. No idea what's going on or how to fix it.

Attachments

storage_err2.jpg

storage_err2.jpg (385.09 KiB) Viewed 2302 times

storage_err1.jpg

storage_err1.jpg (199.9 KiB) Viewed 2302 times


Newbie

Posts

Joined
Thu May 26, 2022 2:15 am

Post by ADD Creative » Thu May 26, 2022 9:42 pm

piercedviking wrote:
Thu May 26, 2022 2:23 am
I am getting similar issues to this, i screen shot the part where it asked to move files and also the errors i now get. No idea what's going on or how to fix it.
Looks like a permissions issue. It's trying to write the log file in your new storage location, but the log directory isn't there or doesn't have the correct permissions.

www.add-creative.co.uk


Expert Member

Posts

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

Users browsing this forum: Semrush [Bot] and 214 guests