Score:0

Laravel Valet 502 Bad Gateway when using Eloquent in php8.0

ki flag

I've got a Laravel 6 application that I'm serving in Valet, I've just upgraded to php8.0 and I'm getting a 502 Bad Gateway error. But curiously only on pages that are using the Eloquent database models, the DB query builder pages seem to run fine.

If I look in the nginx-error.log I have lots of the following error:

2022/10/18 10:05:09 [error] 8175#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: website.test, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/Users/<username>/.config/valet/valet80.sock:", host: "website.test", referrer: "https://website.test/downloads/manage"

Any help much appreciated!

Score:0
ki flag

This ended up being because I had a package that wasn't compatible with php8, the offending package was sofa\eloquence.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.