Versions:
php: 7.2.0
laravel: 6.18.1
The system on the server is: Centos 8
So I am working on a e-commerce project in laravel, using laravel 6 and I am using the bagisto plugin for the e-commerce system, everthing was going will locally but when I deployed the project on the server I kept having this error:
"file_put_contents(/var/www/bagisto/storage/framework/sessions/DRnJtIDM2SubOI9rmibCvvDFoZwycupVIhfIgAE4): failed to open stream: Permission denied"
I've been looking for a solution for this problem a week now and I couldn't find anything to help me solve this problem, I tried the following methods:
1- Changed the permission for the sessions folder to 777.
2- Changed the permission for the whole storage folder using chmod -R 777 storage.
3- Cleared the cache using this command php artisan cache:clear
4- Changed the owner for the whole project using this command sudo chown -R apache:apache bagisto
5- Installed a new project on the server using the root permissions and followed the specific instructions to install the project and the same error kept showing up.
The last thing I've done is moving to the bootstrap/cache folder but I didn't find a folder with the name config.php, So I uploaded the folder from the local project and it gave me this error
"There is no existing directory at "C:\xampp\htdocs\bagisto\storage\logs" and its not buildable: Permission denied"
Wich is right since the home directory changed from one place to another and when I delete the folder that I uploaded "config.php" that error comes back again.
Could you please help me?
Thanks in advance