Unable to create lockable file - Laravel 8 & PHP 8

Viewed 6958

I'm stuck in a Laravel project, I've been using laravel a lot of years and never happened this.

I'm using Vagrant (as always) and only happens this with PHP 8, with other projects with php 7.X doesn't happen.

enter image description here

The USER and GROUP permisions are OK as always. I Ran chmod -R 777 storage and bootstrap/cache a lot of times. I ran all cache:clear.

I don't know why it's happening this.

Anyone had problems with Laravel and PHP 8?

Thanks!

4 Answers

Please use the following commands:

  1. Clear your project's cache
cd /home/vagrant/code/project_folder_name
sudo php artisan cache:clear
  1. Give your folders proper permission
sudo chmod 775 /home/vagrant/code/project_folder_name
sudo chown -R vagrant:vagrant /home/vagrant/code/project_folder_name

Hopefully, it will solve your issue.

I resolved it by providing owner permission to apache user:

chown -R apache:apache storage/framework

I just ran php artisan cache:clear and it worked

Related