Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MikeF1986's avatar

file_put_contents() error since upgrading to Laravel 11.16.0

After upgrading to Laravel 11.16.0, I am now experiencing a PHP Notice error in my test environment. To note, this is NOT present in production, only development.

Error:

Notice: file_put_contents(): Write of 61 bytes failed with errno=32 Broken pipe in /Users/[redacated]/Projects/fpwr/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php on line 21

Has anybody else experienced this issue after upgrading? I have ran all the normal artisan commands to clear cache's etc, to no avail.

1 like
15 replies
Tray2's avatar

Sounds to me like you either don't have access, or your disk is full.

MikeF1986's avatar

@Tray2 the disk is only at 40% capacity. Why would access suddenly be revoked after an upgrade, when it was working flawlessly prior?

Tray2's avatar

@MikeF1986 try using php artisan serve, the other one builds your js and css assets.

1 like
MikeF1986's avatar

@Tray2 Unfortunately even using php artisan serve returns the same error

nanosolutions's avatar

Having same issue specialy when running DUSK test again its.. only in L11

MikeF1986's avatar

@nanosolutions i found the issue. I was running ‘php artisan serve’ command but the default Apache on Mac was also serving the development site. Terminating ‘php artisan serve’ solved it

1 like
nanosolutions's avatar

@MikeF1986 Thats not what the issue is as we have custom port.. still having this issue on latest Laravel 11 :/ unable to run dusk test

ndidev90's avatar

im experiencing the same or very similar issue (L11), when php artisan serve executed (app created using the sail installation, getting it using curl ... | bash), and the app is served, but later I edit something in any config or the .env itself (and forgot stopping the dev server before editing): it starts occupying even more ports: 8000, 8001, 8002 etc. A partial solution is to stop the artisan dev server and kill processes by id, but would be better having a real solution

jp7io's avatar

Same here when setting LOG_CHANNEL=stderr at the .env and having, by accident, some UrlGenerationException triggered. Looks like the ServeCommand parse is receiving a log line which format (prefixed by datetime) is not prepared to handle.

Link to the issue I've just opened: https://github.com/laravel/framework/issues/53534

Workaround is to set LOG_CHANNEL=stack.

bartekgdev's avatar

Encountered the same error. After terminating and rerunning php artisan serve it worked with no error.

2 likes
The_Joel13's avatar

I had the same error , the error was because in my .env i had on APP_URL=http://localhost and i changed to APP_URL=http://127.0.0.1:8000 and it appears , so i fixed reset the local host, the npm run dev, and make sure you have php artisan storage:link

futuremeng's avatar

when Environment modified. Restarting server...

and maybe

Server running on 127.0.0.1:8001.
Failed to listen on 127.0.0.1:8001 (reason: Address already in use)

NFO Server running on 127.0.0.1:8002.

Press Ctrl+C to stop the server

INFO Environment modified. Restarting server...

Failed to listen on 127.0.0.1:8002 (reason: Address already in use)

INFO Server running on 127.0.0.1:8003.

so more than one server are writing to storage

you can

Press Ctrl+C to stop the server

servers

run

php artisan serve

Please or to participate in this conversation.