While working on remote server, you might face folder permission issues which hardly face in local server. Today I will discuss one of them in Laravel application.
After you deploy your application to live server, you may get Laravel error "Please provide a valid cache path." This is because by default all Laravel sessions, cache and compiled files are stored in /storage/framework folders and these folders are mission in your project and storage folder doesn't have enough permission to create these folders. These are below folders should be added:
/var/www/application/storage/framework/
So to solve the issue, you have to create these subfolders and give them permissions. You can create them using server CPanel. Another way is by login to ssh and use command line to create folders. To use command line, first login to remove server and run the below commands to create the subfolders
cd /var/www/application/storage/
mkdir -p framework/{sessions,views,cache}
Now give them permission
sudo chmod -R 777 framework
That's it. The error should have solved.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
How to Get Day, Month and Year from a Date Object in JavaScript
Use the Date() Object Methods You can...How to get Minimum Value Key in Associative Array in PHP
Today we will share with you one simple...How to Install SSL Certificate on Ubuntu Server
SSL certificate is becoming mandatory fo...How to check if an element is hidden using jQuery
Use the jQuery :hidden Selector The j...Laravel Eloquent Many to Many Relationship Tutorial with Example
While designing database structure, you...