fclose() expects parameter 1 to be resource boolean given in opencart library/log.php opencart

五迷三道 提交于 2021-02-08 11:52:27

问题


I have installed opencart2.3 and it was working fine on my localhost. Now I have uploaded it onto Amazon AWS server and its giving me following error

And when I go to modification and make a refresh, this is shown:

Warning: unlink(/var/www/html/system/storage/modification/system/library/template/tiwg.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 101Warning: unlink(/var/www/html/system/storage/modification/system/library/template/php.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 101Warning: rmdir(/var/www/html/system/storage/modification/system/library/template): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 105Warning: unlink(/var/www/html/system/storage/modification/system/library/language.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 101Warning: unlink(/var/www/html/system/storage/modification/system/library/config.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 101Warning: unlink(/var/www/html/system/storage/modification/system/library/cart/cart.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 101Warning: rmdir(/var/www/html/system/storage/modification/system/library/cart): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 105Warning: rmdir(/var/www/html/system/storage/modification/system/library): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 105Warning: unlink(/var/www/html/system/storage/modification/system/engine/loader.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 101Warning: unlink(/var/www/html/system/storage/modification/system/engine/action.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 101Warning: rmdir(/var/www/html/system/storage/modification/system/engine): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 105Warning: rmdir(/var/www/html/system/storage/modification/system): Directory not empty in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 105Warning: unlink(/var/www/html/system/storage/modification/admin/language/en-gb/common/column_left.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 101Warning: rmdir(/var/www/html/system/storage/modification/admin/language/en-gb/common): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 105Warning: rmdir(/var/www/html/system/storage/modification/admin/language/en-gb): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 105Warning: rmdir(/var/www/html/system/storage/modification/admin/language): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 105Warning: unlink(/var/www/html/system/storage/modification/admin/controller/extension/installer.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/modification.php on line 101

I already set a WRITABLE permission to user/group both. But it still shows the same error and when I go to system->setting->server I found save button disabled.

I am very confused why this occured. I have done a lot R&D but no solution found.

Please Help

Thanks in advance.


回答1:


change permission to 777 for files in system/storage/logs/, this works for me,I have tried just now

chmod 777 system/storage/logs/error.log
chmod 777 system/storage/logs/ocmod.log
chmod 777 system/storage/logs/openbay.log



回答2:


Try deleting the files found under the directory system/storage/logs . I had encountered similar error while accessing the dashboard. After deleting those files and giving proper file permissions, the error seems to be gone.



来源:https://stackoverflow.com/questions/42557470/fclose-expects-parameter-1-to-be-resource-boolean-given-in-opencart-library-lo

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