Skip to content

Releases

v1.14.0

Choose a tag to compare

@dunglas-release dunglas-release released this 21 Nov 17:31
30c6bb7

FrankenPHP 1.14.0 makes PHP 8.6 the default. The Docker images tagged latest, the static binaries and the Windows builds now ship PHP 8.6. The php_server directive also gains a configurable file server, which makes serving pre-compressed assets a one-liner.

🐘 PHP 8.6 by Default

  • Docker: images are now built for PHP 8.6, and the latest and version-only tags (such as 1.14 or 1) point to it. Images for older PHP versions stay available with their php8.x tags (such as dunglas/frankenphp:1.14-php8.5) by @dunglas in #2862.
  • Static binaries: built with PHP 8.6. A few extensions don't have a release supporting PHP 8.6 yet (amqp, apcu, igbinary, imagick, lz4, memcached, msgpack, redis, xlswriter…), so they are built from their development branches or from pull requests adding support by @dunglas in #2861.
  • Windows: builds now use the PHP 8.6 binaries compiled with Visual Studio 2026 by @dunglas in #2860.

⚠️ Upgrade Notes

  • Like the official PHP images, the PHP 8.6 Docker images no longer include mbstring nor PECL. Install the extensions you need with install-php-extensions. To stay on PHP 8.5, use the php8.5 tags, such as dunglas/frankenphp:php8.5.

✨ New Features

  • php_server: the file_server subdirective now accepts a block with any file_server option, except root, which stays on php_server. For instance, serving pre-compressed assets no longer requires reordering directives or adding a handle block by @dunglas in #2856:

    php_server {
    	file_server {
    		precompressed zstd br gzip
    	}
    }

πŸ™ Sponsor the Maintainers

Supporting a new PHP version on day one means patching and testing dozens of extensions, Docker images and binaries for every platform. Thanks to our sponsors for making this work possible!

If you or your company rely on FrankenPHP, please consider sponsoring its maintainers:

Need help moving to PHP 8.6? Les-Tilleuls.coop, the company behind FrankenPHP, provides professional support, performance audits, custom development and training: contact@les-tilleuls.coop.

Full Changelog: v1.13.6...v1.14.0

v1.13.6

Choose a tag to compare

@dunglas-release dunglas-release released this 19 Nov 17:58
6775138

FrankenPHP 1.13.6 is a bug fix release. It stops PHP system calls such as stream_select() from failing intermittently because of Go's preemption signal, and fixes a crash when workers are restarted during a configuration reload. Its static binaries, Windows binaries and Docker images also ship the PHP security releases published today, which fix vulnerabilities affecting all supported PHP versions, the most severe rated critical by the PHP project. Upgrading is strongly recommended.

🐘 PHP Security Releases

  • Static binaries, Windows binaries and Docker images now embed PHP 8.5.13. Docker images for older branches embed PHP 8.4.28, 8.3.37 and 8.2.36. See the PHP announcement for details. If you compile FrankenPHP yourself or install it from a package repository, update PHP as well.

πŸ› Bug Fixes

  • Keep Go's SIGURG preemption signal off PHP threads: system calls made by PHP, such as stream_select() or Io\Poll\Context::wait(), no longer fail intermittently with EINTR by @nicolas-grekas in #2833.
  • Worker mode: Ignore worker restarts requested while FrankenPHP starts or stops. A POST /frankenphp/workers/restart on the admin API during a configuration reload crashed the process by @nicolas-grekas in #2832.
  • Exit with status 2 when a PHP thread segfaults while FrankenPHP runs as PID 1, as in containers, instead of hanging by @cyppe in #2595.
  • Windows: Log PHP errors at the right level. Fatal errors were logged as warn and warnings as info by @lazerg in #2839.
  • Static builds: Link libstdc++ statically in the GNU binaries again. Their daily rebuilds had failed since November 9, and the binary would have required a newer libstdc++ than most hosts ship by @dunglas in #2848.
  • Extensions: Compile extensions generated by frankenphp extension-init with GCC 14 and later by @nicolas-grekas in #2834.
  • Docker: Build images from the PHP 8.6 base images, which no longer have a zts variant, ahead of PHP 8.6 images by @dunglas in #2859.
  • Build against PHP 8.7 (php-src master) by @dunglas in #2816.
  • Build against non-ZTS PHP by @dunglas in #2819.

⚑ Performance Improvements

  • Pass the original request URI as a string instead of copying the whole request: 1.2% fewer userland instructions per request by @henderkes in #2813.
  • Skip an unused replacer lookup by @henderkes in #2820.
  • Keep the request option slice on the stack by @henderkes in #2821.

πŸ“– Documentation

  • Warn that max_execution_time counts wall time, while PHP-FPM on Linux counts CPU time by @nicolas-grekas in #2846.
  • Explain the daily rebuilds of release binaries, how to verify them and how to pin a version by @dunglas in #2784.
  • putenv() writes persist across requests handled by the same worker thread by @dunglas in #2783.
  • str_shuffle() also continues the seeded PRNG sequence in worker mode by @sucloudflare in #2825.
  • Worker threads come on top of num_threads by @nicolas-grekas in #2787.
  • Fix the pre-compressed assets example of the Symfony page by @dunglas in #2855.
  • Add the French Symfony page and sync the French worker docs by @KevinMartinsDev in #2693.
  • Link the Yii3 page from the documentation menu by @vjik in #2652.
  • Update translations in #2807, #2854, #2857 and #2858.

πŸ™ Sponsor the Maintainers

Shipping an upstream PHP security fix the same day means tracking the PHP, Docker and Windows releases, then rebuilding and checking dozens of images and binaries, on top of the steady flow of AI-found vulnerability reports we triage. Thank you to our sponsors, who make this work possible!

If you or your company rely on FrankenPHP, please consider sponsoring its maintainers:

πŸ’– New Contributors

Full Changelog: v1.13.5...v1.13.6

v1.13.5

Choose a tag to compare

@dunglas-release dunglas-release released this 05 Nov 12:01
a3663e9

FrankenPHP 1.13.5 is a security release. It fixes 17 vulnerabilities in FrankenPHP. The most severe let php_server run an uploaded non-PHP file as PHP. Several others affect the default php_server configuration: an open redirect, an HTTP/2 Host spoofing issue, a crash a client can trigger with the official Docker images' PHP settings, and slow request bodies that block every PHP thread. This release also upgrades to Caddy 2.11.9, which brings security fixes in Caddy itself, and to Mercure 1.1.6. Upgrading is strongly recommended.

πŸ”’ Security

  • High, php_server: A file whose name doesn't end in a split extension could be run as PHP, for instance /uploads/photos.php.php/avatar.jpg. An attacker able to upload a file under the document root could execute it (GHSA-j99q-3wr8-xj43).
  • Medium, php_server: The trailing-slash redirect for directories echoed the raw request path, so //attacker.example/..%2fblog redirected to another host. The redirect is now relative, like Caddy's php_fastcgi (GHSA-jvmv-5538-pqpg).
  • Medium, HTTP/2: A host header field sent next to :authority set $_SERVER['HTTP_HOST'] to a host other than the one Caddy routed and access-checked the request on (GHSA-2725-rh2w-9j9w).
  • Medium, request_body_timeout: The timeout didn't stop slow request bodies, so an unauthenticated client could block every PHP thread with one slow connection per thread. Fixed by Caddy 2.11.8 and later (GHSA-j45x-h238-h4xx).
  • Medium, crash: A PHP request startup failing repeatedly on a regular thread, for instance with more parameters than max_input_vars and PHP's default settings, crashed the process with a segmentation fault (GHSA-5359-vg53-5464).
  • Medium, crash: exit() or die() with a negative status, such as die(-1), made FrankenPHP panic and stop (GHSA-q6vv-3p75-53wr).
  • Medium, Caddy rules bypass: Dot segments and encoded slashes after a PHP script, such as /admin/tool.php/../../missing.php, let requests run a script that a Caddy path rule was meant to deny (GHSA-2x4j-r638-wxff). On Windows, the same check now also covers backslashes by @dunglas in #2810.
  • Medium, env: A client's Authorization: Basic header replaced the REMOTE_USER value set with env, and four other variables also overrode env values. Only 1.12.0 and later are affected (GHSA-388m-835f-7723).
  • Medium, named routes: A php_server or php directive in a Caddy named route could run with the root, env values and workers of another site. Only 1.13.0 and later are affected (GHSA-g7pw-whv8-97j7).
  • Medium, source disclosure: A php_server with a worker match rule could serve the source of scripts using an extra split extension, or of any script behind some rewrites (GHSA-v7hf-4gqv-hf8p).
  • Medium, worker mode: Destructors of objects from a previous request, including session objects, ran while the next client's output was active, sending output and cookies to the wrong client (GHSA-8qcf-v46r-g2mc).
  • Medium, embedded apps: The extracted app directory was deleted on configuration reloads while the server kept serving from it, so another local user could recreate it with their own code. Incomplete fix of GHSA-6q3j-62j9-f9hh, only 1.13.2 and later are affected (GHSA-j2f3-wxf2-8qgv).
  • Low, Caddyfile disclosure: With the minimal documented layout, php_server served the Caddyfile stored in the document root (GHSA-xh92-4p94-ch7x).
  • Low, autoscaling: FrankenPHP panicked when the operating system refused to create a new PHP thread (GHSA-hfxc-999w-mp67).
  • Low, PATH_INFO: Functions such as getlastmod() and session cache limiters let clients probe the existence and modification time of files under the document root (GHSA-g9v4-rp77-rv76).
  • Low, extension workers: Workers.SendRequest() ran arbitrary files below the working directory when its worker wasn't running (GHSA-cp2q-fc46-38f5), and Workers.SendMessage() freed a zval owned by the caller (GHSA-28vm-87fh-3px5). Only custom builds linking a Go extension that uses these experimental APIs are affected.

Most of these vulnerabilities were found by Anthropic's OSS Scanner.

⚠️ Breaking Change

  • Worker mode: Between requests, FrankenPHP now only resets state built from the HTTP request: superglobals (except $_ENV), the request body, response headers and output, the session and the URL rewriter. strtok(), http_get_last_response_headers(), error_get_last() and the libxml errors persist again, like userland state does. Call error_clear_last(), libxml_clear_errors() or http_clear_last_response_headers() if you need a clean state by @dunglas in #2790.

✨ New Features

  • Populate $_SERVER['SERVER_ADDR'] with the IP address that accepted the connection, like Caddy's FastCGI transport, nginx and Apache by @dunglas in #2809.

πŸ› Bug Fixes

  • Return 413 when the request body exceeds Caddy's request_body max_size instead of passing a truncated body to PHP by @dunglas in #2785.
  • Return 404 No input file specified. when the script can't be opened, like php-fpm, instead of a 200 with a fatal error by @dunglas in #2791.
  • Destroy persistent resources, such as PDO::ATTR_PERSISTENT connections, when a PHP thread exits. With PHP 8.4 and later, each worker restart leaked them, until the database refused new connections by @andreasisaak in #2812.
  • Extensions: Custom Go extensions stay registered after PHP restarts (file watcher, RestartWorkers(), config reloads) by @aguinaldotupy in #2788.
  • Extension workers: SendRequest() reaches workers declared without a name, and SendMessage() returns ErrNotRunning after shutdown instead of waiting forever by @nicolas-grekas in #2786.
  • Worker mode: Warnings raised while parsing the request no longer reach the previous request's error handler and can be read with error_get_last(), as with FPM by @AlliBalliBaba in #2792.
  • Fix a memory leak reported by OSS-Fuzz in the cached HTTP method strings by @dunglas in #2789.
  • Upgrade to Caddy 2.11.9, Mercure 1.1.6 and Vulcain 1.4.6. php_server keeps returning Caddy's 404 for unknown paths in sites without an index.php by @dunglas in #2814.

⚑ Performance Improvements

πŸ“– Documentation

  • Select a single platform in the local static build commands by @opctim in #2805.
  • Update translations in #2808.

πŸ™ Sponsor the Maintainers

The "vulnapocalypse" caused by AI adds a lot of work for us: AI-powered scanners now report vulnerabilities faster than ever, and every report has to be reproduced, fixed and disclosed by a maintainer. This release alone fixes 17 advisories. Thank you to our sponsors, who make this work possible!

If you or your company rely on FrankenPHP, please consider sponsoring its maintainers:

πŸ’– New Contributors

...

Read more

v1.13.4

Choose a tag to compare

@dunglas-release dunglas-release released this 26 Oct 16:51
7f50be9

FrankenPHP 1.13.4 is a security release. It fixes 7 vulnerabilities in FrankenPHP, including a high-severity one that let a single unauthenticated request crash the whole process in worker mode, and several cross-request leaks and memory safety issues in worker mode. Docker images and Windows builds now ship a Brotli library patched against CVE-2026-111497 (Node2Shell), and Windows and macOS binaries are now built with Go 1.27.3, which fixes vulnerabilities in the Go standard library. Upgrading is strongly recommended.

πŸ”’ Security

  • High, worker mode: A client that sent a header name FrankenPHP hadn't seen recently and reset the connection before the request was handled crashed the whole process. Only 1.13.2 and 1.13.3 are affected (GHSA-5f4m-ff4w-g458).
  • Use-after-free: A putenv() call from a shutdown function, a destructor or a session handler left a dangling pointer, and the next script on the thread crashed the process or read the previous request's value on its first getenv() (GHSA-rgpj-f2qx-xwhf).
  • Use-after-free, worker mode: An SplTempFileObject (or SplFileObject on php://temp) kept across requests, on purpose or in uncollected garbage, had its stream freed at the start of the next request (GHSA-cm3q-jw2q-9rh5).
  • Worker mode: Per-request environment variables (Caddy env with request placeholders, route-specific env blocks, WithRequestEnv()) leaked into later requests through getenv() and $_SERVER. $_ENV now only contains the worker's environment (GHSA-8386-64gm-3m8q).
  • Worker mode: http_get_last_response_headers() no longer returns the upstream response headers fetched by a previous request (GHSA-pmvg-8483-mw84). As hardening, the strtok() state and the URL rewriter variables are also reset between requests, as PHP does at the end of a script, although PHP doesn't document them as request-scoped.
  • Worker mode: A worker script ending its own loop right after a JSON or other non-form POST freed the same pointer twice. It only had a visible effect with USE_ZEND_ALLOC=0 (GHSA-h764-4wh7-m7j2).
  • Worker mode: A fatal error during worker request startup left the dequeued request waiting forever (GHSA-x6j6-qv7w-fq3c).
  • Brotli, CVE-2026-111497 (Node2Shell): Docker images ship a patched Brotli: the distribution's security update on Debian Trixie and Alpine, and Brotli 1.2.1 built from source on Debian Bookworm. Windows builds ship Brotli 1.2.1, including the library used by PHP's curl extension. Static binaries have bundled Brotli 1.2.1 since 1.13.2 (GHSA-p746-jj3f-94p8) by @dunglas in #2767, #2777 and #2782.
  • Go: Windows and macOS binaries were built with Go 1.27.0, which is affected by several standard library vulnerabilities, including an HTTP/2 server crash (GO-2026-6617). All release binaries are now built with the latest Go patch release, 1.27.3 by @dunglas in #2776.

Apart from the header crash, which was introduced in 1.13.2 by a change in a dependency, none of the FrankenPHP vulnerabilities fixed in this release were exploitable in common setups, including Symfony and Laravel apps. Triggering them requires specific application code, such as calling putenv() from a shutdown function, or advanced, non-default configuration, such as using request-specific Caddy placeholders in env directives.

FrankenPHP has also been selected for Anthropic's OSS Scanner program, which regularly scans the project for vulnerabilities (anthropics/oss-scanner#1067).

πŸ› Bug Fixes

  • Embed: php-cli now runs extension-less scripts of the embedded app, so ./my-app php-cli bin/console works as documented by @dunglas in #2765.
  • Static builds: Release builds now push the static-builder-{musl,gnu}-{version} image tags, which 1.13.3 didn't by @strikerz5 in #2758.
  • PHP 8.6: Restore compatibility with the development branch by @henderkes in #2770.
  • Upgrade to Mercure 1.1.5 by @dunglas in #2768.

⚑ Performance Improvements

  • Worker mode: Avoid an allocation per request when deriving SCRIPT_NAME for explicitly assigned workers by @andreybolonin in #2755.
  • Worker mode: Avoid buffering output written while a worker starts by @andreybolonin in #2756.

πŸ“– Documentation

  • Document umask() and setlocale() as process-wide state that persists across worker requests and affects concurrent requests by @dunglas in #2779.
  • Update translations in #2769 and #2780.

πŸ’– New Contributors

Full Changelog: v1.13.3...v1.13.4

v1.13.3

Choose a tag to compare

@dunglas-release dunglas-release released this 23 Oct 12:43
ae3d5b9

FrankenPHP 1.13.3 is a bug fix release. It fixes worker lookup for symlinked document roots, crashes caused by PHP extensions that install asynchronous signal handlers, and SIGILL crashes of musl static binaries on CPUs without SHA-NI.

πŸ› Bug Fixes

  • Worker mode: Workers are now matched when resolve_root_symlink false is set and the document root is a symlink. Since 1.13.0, requests ran on a regular thread and failed with "FrankenPHP must be in worker mode". Workers are now also indexed under their declared path by @dunglas in #2739.
  • Extensions: SA_ONSTACK is now re-applied to the signal handlers that extensions install at startup, for every signal and not only SIGSEGV, SIGBUS and SIGFPE. Asynchronous handlers without the flag, such as the SIGVTALRM handler of dd-trace-php, overflowed the goroutine stack and crashed the Go runtime later during garbage collection by @mstegmeyer in #2746.
  • Static builds: musl binaries are now built for the baseline CPU of the architecture instead of the build host's CPU. Release binaries used SHA-NI and AVX-512 without runtime checks, so hash('sha256') died with SIGILL on CPUs without SHA-NI. Set SPC_TARGET=native-native-musl to opt back into host-tuned builds by @dunglas in #2749.

πŸ“– Documentation

πŸ’– New Contributors

Full Changelog: v1.13.2...v1.13.3

v1.13.2

Choose a tag to compare

@dunglas-release dunglas-release released this 21 Oct 18:19
0ad8a40

FrankenPHP 1.13.2 is a security release. Its Docker images and static binaries are built with the PHP versions that fix PHP2Shell (CVE-2026-109618 and CVE-2026-109619), two critical vulnerabilities allowing unauthenticated remote code execution. It also fixes 4 vulnerabilities in FrankenPHP itself, including a high-severity one that let a local user get their PHP code executed by a service running an embedded app. It also makes frankenphp_log() available in php-cli, stops hot reload from serving stale pages, and moves static builds to static-php-cli v3. Static builds have a few changes worth reading in the upgrade notes below. Upgrading is strongly recommended.

πŸ”’ Security

  • Critical, PHP2Shell: Docker images are built with PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12, and static binaries with PHP 8.5.12. These versions fix CVE-2026-109618 and CVE-2026-109619, which allow unauthenticated remote code execution and have no complete mitigation besides upgrading (PHP security advisory).
  • High: Embedded apps were extracted to a predictable directory in the shared temp dir, and existing files were reused. A local user could precreate that directory and get their PHP code executed by the service. Apps are now extracted atomically to a per-user directory, which is only reused when the current user owns it (GHSA-6q3j-62j9-f9hh).
  • Requests waiting for a PHP thread are now dropped when their client disconnects. Before this fix, an unauthenticated client could queue requests, disconnect and keep the thread pool busy for everyone else (GHSA-fq24-r53r-xcx3).
  • Cyclic arrays are now rejected when PHP values are converted to Go. A self-referencing array passed to frankenphp_log(), returned by a worker callback or given to the extension API overflowed the stack and crashed the whole process (GHSA-ccgp-ch9h-533f).
  • Worker mode: The errors returned by error_get_last() and libxml_get_errors() are now cleared at the end of each request. Before this fix, they could leak fragments of a previous client's input and server paths into the next request served by the same thread (GHSA-4gfw-9v29-gp9h).

⚠️ Upgrade Notes

Static builds now use static-php-cli v3 by @henderkes in #2618:

  • macOS: Binaries are only published for Apple Silicon. There is no frankenphp-mac-x86_64 asset anymore. On Intel Macs, build from source with build-static.sh.
  • glibc builds: The -gnu binary now requires glibc 2.28 or later, instead of 2.17.
  • Static builder images: Run them with docker run and pass PHP_EXTENSIONS, PHP_EXTENSION_LIBS, XCADDY_ARGS and the other options as environment variables instead of Docker build args. The binary is written to the mounted /output directory, and the defaults now live in craft.yml. See the static build docs.

✨ New Features

  • CLI: frankenphp_log() and the FRANKENPHP_LOG_LEVEL_* constants are now available in php-cli, so code shared between web requests and commands can log the same way. Entries use the server's format and are written to stderr. The Caddyfile isn't loaded, so its log directives don't apply by @dunglas in #2719.
  • Extensions: frankenphp_thread_index() is exported again for C extensions such as frankenstate and frankenasync by @nickchomey in #2717.

πŸ› Bug Fixes

  • Hot reload: opcache.revalidate_freq now defaults to 0 when hot_reload is configured. With the default of 2, the page fetched right after a change often came back unchanged. A value set in php.ini, in PHP_INI_SCAN_DIR or with the php_ini directive still takes precedence by @dunglas in #2680.
  • Caddy: Thread and request counts are now parsed as int. On 32-bit platforms (linux/386, linux/arm/v6 and linux/arm/v7), out-of-range values wrapped to negative numbers, so max_threads 4294967295 meant auto. They now return a range error by @dunglas in #2722.
  • Static builds: types.h is renamed to frankenphp_types.h, because libwebp's header with the same name shadowed it and broke the build by @alexandre-daubois in #2728.

πŸ“– Documentation

  • Explain how to publish Mercure updates from php-cli through the hub's POST endpoint, and why detecting mercure_publish() while warming caches disables it in the web server too by @dunglas in #2718.
  • Fix the Russian translation by @chubakur in #2712.

πŸ’– New Contributors

Full Changelog: v1.13.1...v1.13.2

v1.13.1

Choose a tag to compare

@dunglas-release dunglas-release released this 16 Oct 21:55
99d4e11

FrankenPHP 1.13.1 fixes the regressions reported since 1.13.0. Nextcloud and other apps that read $_SERVER['REQUEST_URI'] while booting can run in worker mode again, php-cli exposes $argv like the native CLI again (fixing Symfony Console), and Caddy workers retry failed boots as documented instead of giving up on the first error. It also fixes two process crashes and 500 errors during graceful shutdown. Static builds now include the deepclone extension, which speeds up Symfony's cache. Upgrading is recommended for all 1.13.0 users.

✨ New Features

  • Static builds: Add deepclone to the default extensions. It is the native implementation of Symfony's DeepCloner, used by VarExporter::export() (and so the cache.system files) and ArrayAdapter since symfony/var-exporter 8.1, and is several times faster than the PHP polyfill on large object graphs by @soyuka in #2699.

πŸ› Bug Fixes

  • Workers: Set $_SERVER['REQUEST_URI'] to the script name while booting workers, as in 1.12.7. Nextcloud redirected and exited during boot, so its worker failed with "too many consecutive failures" by @dunglas in #2701. Fixes #2697.
  • Workers: max_consecutive_failures now defaults to 6 for workers declared in a Caddyfile or JSON config, as documented. Previously, any boot failure aborted startup without retrying. An explicit 0 still disables retries by @dunglas in #2704.
  • CLI: php-cli sets $argv[0] to the script path (or Standard input code with -r) like the native CLI SAPI, instead of the binary name followed by a shifted script path. This broke Symfony Console and other tools reading $argv by @henderkes in #2691. Fixes #2690.
  • Graceful shutdown: Keep PHP running until Caddy has stopped all apps, so requests served during shutdown_delay and in-flight requests no longer get HTTP 500 errors by @nesl247 in #2645. Fixes #2644.
  • Threads: Fix a segfault of the whole process when restarting an unhealthy thread, a regression since 1.12.4 by @BastienClement in #2696. Fixes #2688.
  • Request body: Don't read the request body after the request has finished. With fastcgi_finish_request() or frankenphp_finish_request() over HTTP/2, PHP's shutdown drained the body after the handler returned, which could crash the process by @dunglas in #2702. Fixes #2694.
  • Forked processes: Only tie direct children of FrankenPHP to its lifetime, so processes that double-fork no longer kill their grandchildren. This broke the gnupg extension ("could not init keylist"), a regression since 1.12.5 by @dunglas in #2703. Fixes #2689.
  • Mercure: Exclude the hub from encode in the sample Caddyfile and document the pattern. Since Caddy 2.11.7 compresses server-sent events, each subscriber held a compression encoder (a few MiB with zstd), and compressing private updates next to attacker-influenced data enables BREACH-style attacks. php-server --mercure isn't affected by @dunglas in #2692.

πŸ’– New Contributors

Full Changelog: v1.13.0...v1.13.1

v1.13.0

Choose a tag to compare

@dunglas-release dunglas-release released this 04 Oct 14:01
233f793

FrankenPHP 1.13.0 is a big one. It upgrades to Caddy 2.11.7, bringing Slowloris protection, the new url_pattern matcher, the Incremental header for streaming apps and many reverse proxy fixes. It ships with Mercure 1.0, the stable version of the real-time protocol. Configuration reloads are now safe: an invalid configuration is rejected before it replaces the running one, instead of leaving the server answering 500. This release also fixes 5 security vulnerabilities, 2 of them rated high. Upgrading is strongly recommended, and the upgrade notes below are worth a read first. Need help with the upgrade or with sizing threads and workers? Les-Tilleuls.coop, the company behind FrankenPHP, provides professional support, performance audits, custom development and training: contact@les-tilleuls.coop.

πŸ”’ Security

  • High: Fix a document-root escape in SCRIPT_FILENAME resolution on Windows (GHSA-868c-7h7m-mmj9).
  • High: Fix header spoofing through dot-form header names: PHP maps Foo.Bar to HTTP_FOO_BAR like Foo-Bar. Caddy 2.11.7 now drops such headers by default, and the NewRequestWithContext() documentation warns library users (GHSA-qcrp-8483-f2f2).
  • Require a path segment boundary when splitting the CGI path, so /uploads/a.php.txt/b.php no longer executes uploads/a.php (GHSA-xxjp-cjxr-2x6m).
  • putenv() no longer writes to the process-wide OS environment, which leaked values across requests and threads (GHSA-996f-w38m-f574).
  • Fix a crash of the whole server process when frankenphp_log() receives a crafted array (GHSA-4prg-hv4r-g6mv).

🌐 Caddy 2.11.7

FrankenPHP 1.12.7 shipped Caddy 2.11.4. This release includes everything from Caddy 2.11.6 and 2.11.7, including:

πŸ“‘ Mercure 1.0

FrankenPHP embeds Mercure 1.0 by @dunglas in #2611:

  • mercure_publish() now throws a ValueError for invalid updates (topic in the reserved /.well-known/mercure namespace, ID starting with #, control characters, invalid UTF-8, negative retry, no topic) and a RuntimeException carrying the hub's message when the dispatch fails.
  • Publisher and subscriber keys are bound to a trusted issuer with the new issuer block. The sample Caddyfile and php-server --mercure use it.

⚠️ Upgrade Notes

  • num_threads now counts the threads for requests no worker serves; worker threads come on top. A configuration that sets num_threads with workers declared starts more threads than before. If max_threads is below num_threads plus the worker threads, startup now fails with an error naming the three numbers. Defaults are unchanged (#2660).
  • Mercure: setting publisher_jwt or subscriber_jwt without protocol_version_compatibility is now a configuration error. Bind keys to a trusted issuer with the new issuer block instead (see #2611 and the sample Caddyfile). Hot reloading follows the protocol: $_SERVER['FRANKENPHP_HOT_RELOAD'] now advertises /.well-known/mercure?match=<topic>, so update any URL hardcoded with ?topic=.
  • Caddy: request headers are now limited to 16 KiB by default (raise it with max_header_size), stalled reads and writes are aborted after 1 minute, headers containing . are dropped like those containing _ already were, a wildcard site's client_auth no longer applies to more specific sites, and some invalid configurations are now rejected. See the Caddy 2.11.6 breaking changes.
  • Building PHP without --disable-zend-signals (ZTS) now makes FrankenPHP refuse to start with an explicit error, instead of hanging while memory grows (#2639).

✨ New Features

  • Extensions: Expose a thread API for Go-based PHP extensions: Thread(index) to get the request bound to a PHP thread, PHPThread.Pin() to keep Go objects alive, PHPThread.IsRequestDone(), and the frankenphp_thread_index() C function by @johanjanssens in #2305.
  • Config reloads: Validate a configuration before it replaces the running one. A missing worker file, a duplicated worker name or an inconsistent thread budget is now rejected and the running configuration keeps serving. Library users get frankenphp.Validate() by @nicolas-grekas in #2661.
  • Threads: num_threads counts the threads left for regular requests, and the startup log reports total_threads and worker_threads by @nicolas-grekas in #2660.
  • Opcache: Log opcache shared-memory restarts and count them in the new experimental frankenphp_opcache_restarts{reason} metric (PHP 8.4+). These restarts are unsafe under ZTS, so the counter should stay at zero by @nicolas-grekas in #2634.
  • php_server: Mirror php_server blocks on the FrankenPHP side, so requests and workers are properly scoped to their block by @AlliBalliBaba in #2499.
  • phpinfo: phpinfo() now has a FrankenPHP section listing the Caddy version, and Go code can add rows with frankenphp.AddPHPInfoEntry() by @henderkes in #2578.
  • CLI: php-cli uses PHP's built-in CLI SAPI on PHP 8.5+ by @withinboredom in #1757.
  • PHP 8.6: Compatibility with PHP 8.6 by @henderkes in #2600.
  • Upgrade to Go 1.27 by @alexandre-daubois in #2626.

πŸ› Bug Fixes

  • Startup: Don't hang requests that arrive before regular threads are ready, which showed up as random 499/504 errors on the first requests after a container start by @ptondereau in #2612.
  • Workers: Log worker crashes at warn level with their exit status, instead of debug like a clean restart by @luminalpark in #2602.
  • Shutdown: Fix Shutdown() hanging forever on a worker that gave up during boot past max_consecutive_failures by @nicolas-grekas in #2662 and #2664.
  • Static builds: Stop the bundled parallel extension from turni...
Read more

v1.12.7

Choose a tag to compare

@dunglas-release dunglas-release released this 07 Aug 07:49
a765b08

FrankenPHP 1.12.7 fixes a bug where output written after fastcgi_finish_request()/frankenphp_finish_request() was silently discarded in classic (non-worker) mode: with the default ignore_user_abort, echoing anything after finishing the request incorrectly marked the connection as aborted and bailed out mid-script. It also quiets noisy debug-level logging for routine client disconnects and fixes an incorrect thread-count metric.

πŸ› Bug Fixes

  • Classic mode: Fix output written after fastcgi_finish_request()/frankenphp_finish_request() being silently discarded. With the default ignore_user_abort, echoing anything after finishing the request incorrectly marked the connection as aborted and bailed out mid-script by @dunglas in #2569. Fixes #2548.
  • Metrics: Report frankenphp_total_threads as a gauge instead of accumulating it, so the metric reflects the current thread count instead of growing unbounded by @ousamabenyounes in #2550. Fixes #2481.
  • Opcache: Remove the opcache-invalidation restart hook again; restarting on every opcache reset could cascade into recursive restarts for frameworks that invalidate the cache heavily by @AlliBalliBaba in #2564.
  • Logging: Stop logging routine client-disconnect write/flush errors at warn level; they're now debug, matching Caddy and Mercure's convention, and no longer mislabeled as "not a flusher" by @dunglas in #2589.
  • Build: Take the PHP_CONFIG environment variable into account in go.sh by @henderkes in #2557.

πŸ“– Documentation

  • Explain why the post-force-kill reboot wait must stay unbounded by @dunglas in #2577.

πŸ’– New Contributors

Full Changelog: v1.12.6...v1.12.7

v1.12.6

Choose a tag to compare

@dunglas-release dunglas-release released this 21 Jul 13:45
4397463

FrankenPHP 1.12.6 fixes a crash that could take down the whole process on HTTP/2. If a PHP script calls frankenphp_finish_request() (or closes its context early) and then lazily reads php://input β€” common with enable_post_data_reading=Off β€” FrankenPHP set a read deadline on an already-finalized HTTP/2 stream and segfaulted. HTTP/1 was unaffected. Anyone serving over HTTP/2 should upgrade.

πŸ› Bug Fixes

  • HTTP/2: Don't set a request body read deadline after the request is finished. Reading php://input after frankenphp_finish_request() dereferenced the nil'd-out HTTP/2 stream state and crashed the process; the deadline is now skipped once the context is done by @dunglas in #2538. Fixes #2535.

πŸ“– Documentation

Full Changelog: v1.12.5...v1.12.6

⌂ 捒网址