I am developing a Laravel app, it was all good until I uploaded to the server, then I got this error
file_put_contents(/home/vagrant/sites/controltienda/storage/framework/sessions/Gm7GMQ0Lb5c2PSMWatoZZrVf6XvTXxOnF0PJB9RH): failed to open stream: No such file or directory
I don't know why it is requesting some file from my local drive which obviously it is not present, I already tried the following:
php artisan route:clear
php artisan route:cache
composer dump-autoload
php artisan cache:clear
Without much success. How can I fix this?
so i keep goin on search and i found this older question Laravel wrong view path. I ran php artisan config:cache and that's all folks.
Thanks for replay.
Related
I just pulled my project from GitHub with an intention of working on it but then when I run PHP artisan key: generate after doing composer install, PHP artisan config: cache and making sure that I have the .env file in the root directory, the command runs successfully but no key is generated. A quick search gives me solutions such as making sure I have a .env file, I do PHP artisan config: clear/cache, I do composer update --no-scripts etc. I have done all those but then realized again that it might be an error with PHP 7.4 from this post on GitHub:
https://github.com/laravel/framework/issues/32059
Could anyone suggest possible solutions to this problem?
I have uploaded all files in dreamhost server and also point our domain to public directory. But when I open website it is showing site not found. Below is website link.
https://laraveleqn.samiflabs.com/
I have direct uploaded all files from local xampp, in that it is working fine..so should I execute all command like key:generate, composer install again ?
Any help will be appreciated..
Thanks
Hi Samif, There is not any specific reason to solve the kind of error
but some conclusion for solve the error.
First you can check .env file in your server.
composer install and clear cache via
php artisan config:cache
php artisan config:clear
php artisan cache:clear
And finally not solved then try to Dump and Die on index.php in public folder
i deployed my laravel app to a shared hosting and i got this error
file_put_contents(C:\xampp\htdocs\laravel Projects\bank\iscbank\storage\framework/sessions/qM5STFvAXNcmpuJkllutrtS1PumOi0OXhG7TdNwL): failed to open stream: No such file or directory
i followed all the instructions on how to install laravel app in cpanel.
I dont know if its because i ran these commmands before zipping the project
php artisan cache:clear
php artisan config:clear
i dont know whats wrong or what i did wrong
Do these
Remove files from bootstrap/cache folder
Remove all the files/folder inside from these
storage/framework/cache,
storage/framework/sessions,
storage/framework/views
and try
I wanted to remove a package from laravel. I did composer remove vendor/package
It was all good on my dev, but when I deploy on production something went wrong and I cannot do anything now.
when I run
php artisan package:discover
I'm geting
In ProviderRepository.php line 208:
Class 'Laracasts\Flash\FlashServiceProvider' not found
I'm guessing I it is something to do with some kind of cache or maby config
but I cannot run this command,
php artisan config:clear
because I'm getting the same error message as above.
PS. I'm using Laravel 5.6
You may need clear the autoloader files if they get jammed up as it is looking at those cached files when php artisan config:clear runs, thus creating the jam.
Remove the following files and they will rebuild:
/bootstrap/cache/packages.php
/bootstrap/cache/services.php
I fixed my problem deleting a config file like so:
$rm bootstrap/cache/config.php
This file is basically a cache for config, if you want to have this file built for you just run a following artisan command:
$php artisan config:cache
my website run correctly at localhost but when i upload it on CPanel it makes a mistake and say me view index not found
InvalidArgumentException View [index] not found.
this is my Route Code:
Route::get('/', function () {
return view('index');
});
Also i executed these commands:
php artisan config:cache
php artisan config: clear
php artisan view:clear
composer update
php artisan route:clear
but it have no response!!!!!
What's your resources/views directory's permission? It should accessible by your web server.
You should try : php artisan cache:clear
If these commands work:
php artisan config:cache or php artisan
config:clear?
named your view correctly with yourview.blade.php?
placed the view correctly in the resources\views?
Maybe the problem is that your server is not setting up properly because the domain doesnt connected properly to your VPS. Contact the hosting provider.
i solved it, i upload new project and it solved but i don't know what is the issue of last project. It's so weird