Live data from Hacker News

Show HN: FrankenPHP, an app server for PHP written in Go

frankenphp.dev

11–20 of 93 posts

Re: Show HN: FrankenPHP, an app server for PHP written in Go

#12

I might be missing the obvious but why would you add extra complexity to your infrastrucutre setup when PHP can be run natively from within caddy, apache, nginx via fastcgi.

With this you don't need FastCGI. FrankenPHP is simpler and less complex: just run it directly from your Caddy web server.

Re: Show HN: FrankenPHP, an app server for PHP written in Go

#15
So it's mod_php for Caddy, in reverse?

The traditional idea is to build a plug-in for the parent webserver. By essentially "making a fork" of Caddy, if you want to add other plugins to Caddy and then incorporate them into FrankenPHP, it's a lot more work. If instead you ship a PHP plugin to Caddy, you can manage Caddy instead and mix and match different functionality in one place.

But I guess it's heretical to suggest somebody use plugins in Go, if the whole idea is everything is a static binary.

Re: Show HN: FrankenPHP, an app server for PHP written in Go

#17

I might be missing the obvious but why would you add extra complexity to your infrastrucutre setup when PHP can be run natively from within caddy, apache, nginx via fastcgi.

Removing php-fpm + nginx from a container sounds AMAZING to me. If I can just have one thing in a container (plus a code base), that would be a LOT simpler than:

nginx, php-fpm, some init system, and the convoluted configuration needed to get logs out via Docker's logging mechanism.

Re: Show HN: FrankenPHP, an app server for PHP written in Go

#18
post #6

I've been watching how Go and Rust tooling has been finding its way into the JavaScript ecosystem. I've been out of the PHP realm for about 10 years but I did find RoadRunner for PHP at one point. That's also an app server written in Go I believe. I wonder how this compares.

My understanding is RoadRunner is more like FrankenPHP's "worker mode" (RoadRunner only makes sense in context of Laravel Octane), where as FrankenPHP can run "normally" as well.

Re: Show HN: FrankenPHP, an app server for PHP written in Go

#19

So it's mod_php for Caddy, in reverse? The traditional idea is to build a plug-in for the parent webserver. By essentially "making a fork" of Caddy, if you want to add other plugins to Caddy and then incorporate them into FrankenPHP, it's a lot more work. If instead you ship a PHP plugin to Caddy, you can manage Caddy instead and mix and match different functionality in one place. But I guess it's heretical to sugges…

Early Hints breaks a lot of the common APIs (like FastCGI/FPM) where you are expected to have one request and one response. I don't know how Caddy specifically works, but I suspect that may be the reason for the fork.

Re: Show HN: FrankenPHP, an app server for PHP written in Go

#20

I see a bit of C as well ? Also, do we need to use Docker ? I am very interested in trying but wanted to check. If it is Go, can I not just compile the binary and execute ?

When do things ever "just compile"? I assume the Docker image is because this is a pre-alpha and the docker image ensures that no one needs to go through hours of dependency/config hell because the docker image is set up with everything necessary already, letting you focus on alpha-testing this and reporting bugs.
Post reply on HN