简体   繁体   中英

Errors on Opencart website developed n local PC after being uploaded to live server

I have developed an OC store on my local PC using XAMPP. I've uploaded the store to the server, and it's displaying well, BUT there are some irregularities. To cite an example, admin panel isn't functioning properly - I can sign in, but nothing is displayed then. I am almost sure the problem is in the urls, but as I have messed with the site once and had to reupload it, I more than welcome help from others. There are two sections of error messages - one in the header and one in the footer.

Errors in the header:

Warning: fopen(/home/davofvpt/public_html/storage/logs/openbay.log): failed to open stream: No such file or directory in /home/davofvpt/public_html/system/library/log.php on line 22

Warning: fopen(/home/davofvpt/public_html/storage/logs/openbay.log): failed 
to open stream: No such file or directory in 
/home/davofvpt/public_html/system/library/log.php on line 22
Warning: fclose() expects parameter 1 to be resource, boolean given in 
/home/davofvpt/public_html/system/library/log.php on line 39
Warning: Cannot modify header information - headers already sent by (output 
started at /home/davofvpt/public_html/system/framework.php:42) in 
/home/davofvpt/public_html/catalog/controller/startup/session.php on line 
25Warning: Cannot modify header information - headers already sent by 
(output started at /home/davofvpt/public_html/system/framework.php:42) in 
/home/davofvpt/public_html/catalog/controller/startup/startup.php on line 
99Warning: Cannot modify header information - headers already sent by 
(output started at /home/davofvpt/public_html/system/framework.php:42) in 
/home/davofvpt/public_html/catalog/controller/startup/startup.php on line 
157Warning: fopen(/home/davofvpt/public_html/storage/logs/openbay.log): 
failed to open stream: No such file or directory in 
/home/davofvpt/public_html/system/library/log.php on line 22
Warning: fclose() expects parameter 1 to be resource, boolean given in 
/home/davofvpt/public_html/system/library/log.php on line 39
Warning: fopen(/home/davofvpt/public_html/storage/logs/error.log): failed to 
open stream: No such file or directory in 
/home/davofvpt/public_html/system/library/log.php on line 22

Errors in the footer:

Warning: fclose() expects parameter 1 to be resource, boolean given in 
/home/davofvpt/public_html/system/library/log.php on line 39Warning: 
fclose() 
expects parameter 1 to be resource, boolean given in 
/home/davofvpt/public_html/system/library/log.php on line 39Warning: 
fclose() 
expects parameter 1 to be resource, boolean given in 
/home/davofvpt/public_html/system/library/log.php on line 39

Here is my config.php in the public folder

This is my config.php in the admin folder

I managed to resolve this issue by tracing the error message:

  1. I created ($touch storage/logs/error.log) The file name is mentioned in the error message
  2. I applied the permissions (chmod 777 storage/logs/error.log)
  3. Did 1,2 for openbay.log
  4. I noticed that the storage folder the owner _www which I changed to my user name (I dont think this step is required - just 1-3 should do the trick)

Note: I started with deleting the storage folder contents

You have moved your "storage" folder from the main directory (such as system/storage) to other location. please restore folder to moved location.

or install Opencart using auto installer.

If you are not expert in Opencart, then follow these steps.


  1. Install new opencart(your required version).
  2. Download or copy the config file from admin folder.
  3. Upload your modified admin and catalog folder to server (using FTP).
  4. Re-upload the downloaded config file to admin folder.

Now it works same as on localserver

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM