Reputation: 57
I had a look around and most of the answers weren't for shared hosting which happens to be my case.
I've done chmod
on storage
and bootstrap/cache/
to 775
. I also have a storage/framework/views
directory, I have also tried deleting storage/logs/laravel.log
.
N.B The script worked well on my former shared hosting plans and only the page with a file_get_contents
seems to be the issue.
The file in question is ErrorException
in PostController.php line 17
: where I'm using a file_get_contents
call.
Upvotes: 3
Views: 15264
Reputation: 553
On CentOS 7 + Apache:
cd /var/www/laravelfolder
sudo chown apache:apache -R /var/www/laravelfolder
find . -type f -exec chmod 0644 {} \;
find . -type d -exec chmod 0755 {} \;
sudo chcon -t httpd_sys_content_t /var/www/laravelfolder -R
sudo chcon -t httpd_sys_rw_content_t /var/www/laravelfolder/storage -R
sudo chcon -t httpd_sys_rw_content_t /var/www/laravelfolder/bootstrap/cache -R
Upvotes: 5
Reputation: 51
I think you have set wrong permissions. Give 777 permissions instead of 775 to bootstrap\cache and storage directory. Please have a look here.
Upvotes: 0