Opencart errors

不打扰是莪最后的温柔 提交于 2020-06-27 11:59:23

问题


I am getting the following error after transferring the OpenCart website to new sever from old server. I have also changed the folder permission to 777 but still getting the error.

http://5cross.com/index.php?route=common/home

These are the errors I am receiving:

Warning: fopen(/home/cross5/public_html/system/logs/error.log): failed to open stream: Permission denied in /home/cross5/public_html/system/library/log.php on line 6

Warning: unlink(/home/cross5/public_html/system/cache/cache.currency.1440668347): Permission denied in /home/cross5/public_html/system/library/cache/file.php on line 17

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

Warning: unlink(/home/cross5/public_html/system/cache/cache.language.1440668347): Permission denied in /home/cross5/public_html/system/library/cache/file.php on line 17

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

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/cross5/public_html/system/library/log.php:6) in /home/cross5/public_html/system/library/session.php on line 12

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

Warning: fopen(/home/cross5/public_html/system/logs/openbay.log): failed to open stream: Permission denied in /home/cross5/public_html/system/library/log.php on line 6

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


回答1:


Please double check your permissions:

# OpenCart 1.5x
/system/logs/
/system/cache/

# OpenCart 2.1x and above
/system/storage/logs/
/system/storage/cache/

If you have console access (or ask your provider), you can do this by:

# OpenCart 1.5x
chmod 777 /home/cross5/public_html/system/logs/ -R
chmod 777 /home/cross5/public_html/system/cache/ -R

# OpenCart 2.1x and above
chmod 777 /home/cross5/public_html/system/storage/logs/ -R
chmod 777 /home/cross5/public_html/system/storage/cache/ -R



回答2:


Make sure you give all permissions to files

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

Hope it will work for you!



来源:https://stackoverflow.com/questions/32275649/opencart-errors

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!