I tried to upload my site to laravel to host and be configured but I couldn\'t load the project. The error is as follows:
file_put_contents(): Exclusi
Try to remove the following line of code in your path:
public function put($path, $contents, $lock = false)
{
return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
}
and replace it with this one below:-
public function put($path, $contents, $lock = false)
{
return file_put_contents($path, $contents, 0);
}
The problem is that the host is not supporting "exlusive locks". I had this problem with Vagrant on a Ubuntu host. Then you can fix it like described here: https://stackoverflow.com/a/35743592/2707570 If you have the problem on a remote server you need to contact the provider and ask why exclusive locks are not supported.
You have to close the server by closing your batch window you used in starting the server initially.
Refresh your browser and make sure the the server has been closed.
Start a new development server by typing $ php artisan serve
Go to your browser and enter the server address generated by the artisan. It's usually http://127.0.0.1:8000
I had the same error, while using NFS to share my code from my developer machine to my Centos server. The problem seems to be that the server tried to access my NFS-shared files using NLM locking by default, so I had to disable locking in my settings. This is done by adding nolock
in the NFS options in /etc/fstab
This fixed the issue for me
I had a similar issue recently. Running the artisan command: php artisan config:cache fixed it for me