Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

From Laravel I got failed to open stream: Permission denied

Tags:

php

laravel

I use Laravel 5.4 and got the error at Web Server as below

PHP Fatal error: Uncaught ErrorException: file_put_contents(/github/myweb/monitor/storage/framework/views/b38c71581503e85762ce2fe49a8bis726b1164d9.php): failed to open stream: Permission denied n /github/myweb/monitor/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122\nStack trace:\n#0 [internal function]:

When I tested on local every thing is fine, but after pushing code to server, i am getting error for path '/github/myweb/' where it's from. I want path like this

/var/www/master/monitor

How to remove prefix '/github/myweb/' from path I don't know where it's from

What Is wrong?

like image 728
Neung Kittipong Avatar asked Dec 14 '22 12:12

Neung Kittipong


1 Answers

First Clear your Cache,

php artisan config:clear
php artisan config:cache

And Then Run sudo chmod -R 755 storage/

Alternatively you can delete your bootstrap/cache/config.php

like image 155
Vicky Gill Avatar answered Dec 17 '22 23:12

Vicky Gill