Go to file
2022-10-11 08:57:23 +02:00
C-Thread-Pool@d42cc5a2f7 feat: use threads instead of GoRoutines (#6) 2022-10-04 14:41:19 +02:00
caddy feat: use Zap for logging 2022-10-04 17:42:45 +02:00
internal/testserver feat: use Zap for logging 2022-10-04 17:42:45 +02:00
testdata feat: handle errors in worker mode (#9) 2022-10-11 08:10:46 +02:00
.gitignore fix: preserve autoloading in worker mode 2022-10-06 15:25:58 +02:00
.gitmodules feat: use threads instead of GoRoutines (#6) 2022-10-04 14:41:19 +02:00
cgi.go feat: add a woker mode (#1) 2022-05-18 11:52:24 +02:00
CONTRIBUTING.md feat: use threads instead of GoRoutines (#6) 2022-10-04 14:41:19 +02:00
Dockerfile feat: improve sessions handling in workers 2022-10-07 16:59:27 +02:00
frankenphp_arginfo.h feat: add stub PHP functions (#10) 2022-10-11 08:57:23 +02:00
frankenphp_test.go feat: improve PHP logger 2022-10-08 13:05:18 +02:00
frankenphp.c feat: add stub PHP functions (#10) 2022-10-11 08:57:23 +02:00
frankenphp.go feat: handle errors in worker mode (#9) 2022-10-11 08:10:46 +02:00
frankenphp.h feat: use threads instead of GoRoutines (#6) 2022-10-04 14:41:19 +02:00
frankenphp.stub.php feat: add stub PHP functions (#10) 2022-10-11 08:57:23 +02:00
go.mod feat: improve PHP logger 2022-10-08 13:05:18 +02:00
go.sum feat: improve PHP logger 2022-10-08 13:05:18 +02:00
options.go feat: use Zap for logging 2022-10-04 17:42:45 +02:00
README.md feat: improve sessions handling in workers 2022-10-07 16:59:27 +02:00
worker_test.go feat: use Zap for logging 2022-10-04 17:42:45 +02:00
worker.go feat: handle errors in worker mode (#9) 2022-10-11 08:10:46 +02:00

Caddy PHP

Install

Docker

The easiest way to get started is to use our Docker image:

docker build -t frankenphp .

Compile From Sources

Install PHP

To use FrankenPHP, you currently need to compile a fork of PHP. Patches have been contributed upstream, and some have already been merged. It will be possible to use the vanilla version of PHP starting with version 8.3.

First, get our PHP fork and prepare it:

git clone https://github.com/dunglas/php-src.git
cd php-src
git checkout frankenphp-8.2
./buildconf

Then, configure PHP for your platform:

Linux:

./configure \
    --enable-embed \
    --enable-zts \
    --disable-zend-signals

Mac:

Use the Homebrew package manager to install libiconv and bison:

brew install libiconv bison
echo 'export PATH="/opt/homebrew/opt/bison/bin:$PATH"' >> ~/.zshrc

Then run the configure script:

./configure \
    --enable-embed=static \
    --enable-zts \
    --disable-zend-signals \
    --disable-opcache-jit \
    --with-iconv=/opt/homebrew/opt/libiconv/

These flags are required, but you can add other flags (extra extensions...) if needed.

Finally, compile PHP:

make -j6
make install

Compile the Go App

You can now use the Go lib and compile our Caddy build:

cd caddy/frankenphp
go build

Misc Dev Resources