I have a website which works locally (through VM), but when I upload it to the server I get this error
ErrorException in Filesystem.php line 111:
file_put_contents(/home/vagrant/Code/xxxx/storage/framework/sessions
/Ec2ceBoBBnKIOx8SzMXOf4akbzA5g5aI9WHBEhn6):
failed to open stream: No such file or directory
Things I've tried that didn't help: running composer update, running dump-autoload, running cache:clear, running config:cache, deleting everything on server and re-uploading everything after, creating directory/file manually, setting permissions to 777.
Any insights?
Related
Each time I edit a blade file I have to run php artisan view:clear in order for the page to load correctly otherwise I get the following error
ErrorException (E_ERROR)
file_put_contents(/home/vagrant/Code/app/storage/framework/views/fsfsawe8bde92c95bad12ddfcfaea1738afsac0.php): failed to open stream: Permission denied (View: /home/vagrant/Code/app/resources/views/header.blade.php)
I am using the following:
Homestead v7.14.2
Vagrant (2.1.2)
I also recently ran sudo apt-get upgrade on my vm.
The Homestead update script did not install php 7.2 so I did that manually.
The permissions on my storage folders are all 777.
How do I setup laravel so that I do not have to keep running php artisan view:clear each time I make a change?
What has worked for me regarding this same issue, is to change apache or nginx to run as your local user or another that you have created and then change the laravel application directory ownership to this user using a chmod user -R. Or conversely you could change the project ownership to the web server user account.
I am facing folder permission problem in my xampp server. when i am running laravel command php artisan route:list. then i am getting error
[ErrorException]
Key file "file://G:\Local Server\xampp\htdocs\Examples\example
1\laravel\storage\oauth-private.key" permissions are not correct, should be
600 or 660 instead of 666.
I use laravel on homestead. I tried a lot of different commands in order to clear cache and other stuff and nothing helped.
I keep getting this error:
file_put_contents(/Users/Victor/Sites/pft/pft-back/storage/framework/cache/data/05/9f/059f793d8b638b8c21ead7edbba382b9e9183fac): failed to open stream: No such file or directory
What I've tried is:
Set 777 for storage folder
php artisan cache:clear
php artisan view:clear
php artisan clear-compiled
composer dump-autoload
No idea why it's happening but I'm pretty sure because of homestead since I've just recently started using it.
Also I tried all commands both from homestead user and mac user (I'm running homestead on mac)
The problem is the underlying storage maps, could check if storage/framework, storage/framework/cache and storage/framework/cache/data have r/w permission and otherwise create them?
I am trying to run a Symfony2 project on my local server after downloading it from the FTP. I keep getting this error when running the server:
Warning: require(app_dev.php): failed to open stream: No such file or
directory in
/Users/bogdan/Sites/httpdocs/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php
on line 36
I am running everything on developer mode.
I would suggest to read http://symfony.com/doc/current/book/installation.html firstly.
Anyway I think that you run console from a bad path. You have to run app/console server:run. It means that you have to be in a root directory of your project.
cd my_symfony2_project
php app/console server:run
When I try to run a symfony console php command (generate:bundle, etc) in cygwin, I get an error similar to:
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: file_get_contents(E:/xampp/htdocs/foo_com/app/config/parameters.yml): failed to open stream: No such file or directory in /cygdrive/e/xampp/htdocs/foo_com/vendor/symfony/symfony/src/Symfony/Component/Yaml/Yaml.php line 61
If I delete the app/cache folder, I can run the app/console commands without any issues, until I access my page in the browser. Once I access my page in the browser I start to get this error again.
Try to do the following:
(assuming that you run windows 7):
run cygwin\bin\dash.exe as administrator
/usr/bin/rebaseall -v
run cygwin.bat as administrator
In my case it solved this problem.