Opencart网站上的错误在上传到实时服务器后在本地PC上开发

时间:2017-12-28 14:15:38

标签: php url file-upload opencart

我使用XAMPP在我的本地PC上开发了一个OC商店。我已经将商店上传到服务器,它显示得很好,但是存在一些不规范之处。举一个例子,管理面板无法正常运行 - 我可以登录,但不会显示任何内容。我几乎可以肯定问题出现在网址中,但由于我曾经对网站搞过一次并且不得不重新加载它,我非常欢迎其他人的帮助。错误消息有两部分 - 一部分在页眉中,另一部分在页脚中。

标题中的错误:

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

页脚中的错误:

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

2 个答案:

答案 0 :(得分:1)

我设法通过跟踪错误消息来解决此问题:

  1. 我创建了($ touch storage / logs / error.log)错误消息中提到了文件名
  2. 我应用了权限(chmod 777 storage / logs / error.log)
  3. openbay.log的1,2
  4. 我注意到存储文件夹的所有者_www更改为我的用户名(我认为这不是必需步骤-只需1-3即可完成操作)

注意:我首先删除存储文件夹内容

答案 1 :(得分:0)

您已经移动了"存储"文件夹从主目录(如系统/存储)到其他位置。 请将文件夹恢复到移动的位置。

或使用自动安装程序安装Opencart。

如果您不是Opencart的专家,请按照以下步骤操作。

  1. 安装新的opencart(您需要的版本)。
  2. 从admin文件夹下载或复制配置文件。
  3. 将修改后的管理员和目录文件夹上传到服务器(使用FTP)。
  4. 将下载的配置文件重新上传到admin文件夹。
  5. 现在它与localserver

    的工作方式相同