aardalich's avatar

[L5] New install error

Heyas

Thought I'd pull in L5 and have a play now that the big changes has settled down.

Have had a build from a few weeks back working fine in my environment (around when it had the bootstrap menu included).

A fresh pull today gets me an error out the box
file_put_contents(): Exclusive locks are not supported for this stream

Tried chmodding 777 on the storage folder with no joy and if I clear-compile the same error just moves to a different file.

When I google the error it appears it may be around file system locking which can occur when the files are over NFS, which would be how my dev environment is setup, macos, vagrant, virtualbox (FreeBSD rather than homestead) and the file sharing between macos and the VM is via NFS.

Anyone else having the issue? Not sure if I landed on a problem commit of dev-develop or there is a more sinister issue I'm going to hit with L5 and my environment.

Thanks

0 likes
4 replies
bestmomo's avatar

There has been many commits yesterday and... some bugs. You should set an old commit till all this is fixed. Look at this discussion.

aardalich's avatar

Hey bestmomo, thanks for replying.

Doesn't look like that is my issue.

I've been testing more today, found if I install L5 on a filesystem not shared by MacOS for dev but on one within the VM itself, the error doesn't occur.

It seems to be the LOCK_EX constant being used on file_put_contents commands from the little investigation I've done that's causing it.

Because the files are being shared from MacOS over NFS, the LOCK_EX (exclusive lock to the file) is failing. I think I can see the commit that's done it, https://github.com/laravel/framework/blob/4e7cf5438629c82d99b921f47ff1f6c05a8d1869/src/Illuminate/Filesystem/Filesystem.php

So I know what to change in the src to remove the error, now wondering if I can set the LOCK_EX constant for my local dev environment somewhere.

aardalich's avatar

FYI - if anyone else happens on this problem

Have been pointed in the right direction, cannot have file based sessions.

pbgordon's avatar

this error happens after running composer update. I would like to understand here to address it. I resolved it by just grabbing a fresh copy of laravel via laravel new blog and moved my modified files in. Searches all over for this didnt come up with an answer. Using my own ubuntu 14.4 VM for development, so the matter could be with that.

so for now, avoid running composer update.

Please or to participate in this conversation.