You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Chicago-style title case: capitalize first/last word and all major
words; lowercase articles (a, an, the), coordinating conjunctions (and,
but, or, nor, for, so, yet), and prepositions regardless of length
(with, from, after, between, across, etc.).
Also fix the "Mode :" / "Emulation :" stray spaces before colons in
extension-workers.md, capitalize "User" in the parenthetical, and
title-case "Real-Time", "PHP Config", and the lowercase "packages"/
"binary" / "Component" / "using" cases that slipped in.
Copy file name to clipboardExpand all lines: docs/compile.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
-
title: Compile FrankenPHP from sources with libphp.so
2
+
title: Compile FrankenPHP from Sources with libphp.so
3
3
description: Build FrankenPHP from source on Linux, macOS and FreeBSD, linking PHP as a shared library via xcaddy or go build, and add custom Caddy modules and extensions.
4
4
---
5
5
6
-
# Compile From Sources
6
+
# Compile from Sources
7
7
8
8
This document explains how to create a FrankenPHP binary that will load PHP as a dynamic library.
Copy file name to clipboardExpand all lines: docs/config.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Configuring FrankenPHP With Caddyfile, php.ini, and Env Vars
2
+
title: Configuring FrankenPHP with Caddyfile, php.ini, and Env Vars
3
3
description: Configure FrankenPHP and Caddy via Caddyfile, JSON, or environment variables, including PHP runtime tuning, worker mode, file watching, and module options.
4
4
---
5
5
@@ -53,7 +53,7 @@ RUN cp $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
53
53
RUN cp $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini
54
54
```
55
55
56
-
## RPM and Debian packages
56
+
## RPM and Debian Packages
57
57
58
58
FrankenPHP:
59
59
@@ -65,7 +65,7 @@ PHP:
65
65
-`php.ini`: `/etc/php-zts/php.ini` (a `php.ini` file with production presets is provided by default)
@@ -248,7 +248,7 @@ where the FrankenPHP process was started. You can instead also specify one or mo
248
248
249
249
The file watcher is based on [e-dant/watcher](https://github.com/e-dant/watcher).
250
250
251
-
## Matching the Worker To a Path
251
+
## Matching the Worker to a Path
252
252
253
253
In traditional PHP applications, scripts are always placed in the public directory.
254
254
This is also true for worker scripts, which are treated like any other PHP script.
@@ -271,7 +271,7 @@ and otherwise forward the request to the worker matching the path pattern.
271
271
}
272
272
```
273
273
274
-
## Restarting Threads After a Number of Requests (Experimental)
274
+
## Restarting Threads after a Number of Requests (Experimental)
275
275
276
276
FrankenPHP can automatically restart PHP threads after they have handled a given number of requests.
277
277
When a thread reaches the limit, it is fully restarted,
@@ -303,7 +303,7 @@ As for FPM and CLI SAPIs, environment variables are exposed by default in the `$
303
303
304
304
The `S` value of [the `variables_order` PHP directive](https://www.php.net/manual/en/ini.core.php#ini.variables-order) is always equivalent to `ES` regardless of the placement of `E` elsewhere in this directive.
305
305
306
-
## PHP config
306
+
## PHP Config
307
307
308
308
To load [additional PHP configuration files](https://www.php.net/manual/en/configuration.file.php#configuration.file.scan),
309
309
the `PHP_INI_SCAN_DIR` environment variable can be used.
Copy file name to clipboardExpand all lines: docs/embed.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Embedding PHP Apps as Standalone Binaries with FrankenPHP
3
3
description: How to package a PHP application (including Symfony or Laravel) as a self-contained static binary with FrankenPHP, the PHP interpreter, PHP extensions and Caddy.
4
4
---
5
5
6
-
# PHP Apps As Standalone Binaries
6
+
# PHP Apps as Standalone Binaries
7
7
8
8
FrankenPHP has the ability to embed the source code and assets of PHP applications in a static, self-contained binary.
Copy file name to clipboardExpand all lines: docs/extension-workers.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ func init() {
39
39
}
40
40
```
41
41
42
-
### In a Caddy Module (Configurable by the user)
42
+
### In a Caddy Module (Configurable by the User)
43
43
44
44
If you plan to share your extension (like a generic queue or event listener), you should wrap it in a Caddy module. This allows users to configure the script path and thread count via their `Caddyfile`. This requires implementing the `caddy.Provisioner` interface and parsing the Caddyfile ([see the frankenphp-queue Caddy module example](https://github.com/dunglas/frankenphp-queue/blob/main/caddy.go)).
45
45
@@ -51,7 +51,7 @@ If you are [embedding FrankenPHP in a standard Go application without caddy](htt
51
51
52
52
Once the worker pool is active, you can dispatch tasks to it. This can be done inside [native functions exported to PHP](https://frankenphp.dev/docs/extensions/#writing-the-extension), or from any Go logic such as a cron scheduler, an event listener (MQTT, Kafka), or any other goroutine.
53
53
54
-
### Headless Mode: `SendMessage`
54
+
### Headless Mode: `SendMessage`
55
55
56
56
Use `SendMessage` to pass raw data directly to your worker script. This is ideal for queues or simple commands.
Copy file name to clipboardExpand all lines: docs/internals.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ Set(Ready)
153
153
state is Ready → normal execution
154
154
```
155
155
156
-
## CGO Boundary Between Go and PHP
156
+
## CGO Boundary between Go and PHP
157
157
158
158
### Exported Go Functions
159
159
@@ -190,7 +190,7 @@ while ((scriptName = go_frankenphp_before_script_execution(thread_index))) {
190
190
191
191
Bailouts (fatal PHP errors) are caught by `zend_catch`, which marks the thread as unhealthy and forces cleanup.
192
192
193
-
### Memory Management Across the CGO Boundary
193
+
### Memory Management across the CGO Boundary
194
194
195
195
-**Go → C strings**: `C.CString()` allocates with `malloc()`. The C side is responsible for freeing (e.g., `frankenphp_free_request_context()` frees cookie data).
196
196
-**Go string pinning**: `phpThread` (in `phpthread.go`) embeds Go's [`runtime.Pinner`](https://pkg.go.dev/runtime#Pinner). `thread.Pin()` / `thread.Unpin()` keep Go memory referenced from C alive without copying it. The thread is unpinned after each script execution.
Copy file name to clipboardExpand all lines: docs/laravel.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ See also [how to use Mercure with Octane](#mercure-support).
86
86
87
87
Learn more about [Laravel Octane in its official documentation](https://laravel.com/docs/octane).
88
88
89
-
## Laravel Apps As Standalone Binaries
89
+
## Laravel Apps as Standalone Binaries
90
90
91
91
Using [FrankenPHP's application embedding feature](embed.md), it's possible to distribute Laravel
92
92
apps as standalone binaries.
@@ -169,7 +169,7 @@ Your app is now ready!
169
169
Learn more about the options available and how to build binaries for other OSes in the [applications embedding](embed.md)
170
170
documentation.
171
171
172
-
### Changing The Storage Path
172
+
### Changing the Storage Path
173
173
174
174
By default, Laravel stores uploaded files, caches, logs, etc. in the application's `storage/` directory.
175
175
This is not suitable for embedded applications, as each new version will be extracted into a different temporary directory.
@@ -205,7 +205,7 @@ You can use [all directives supported by Mercure](https://mercure.rocks/docs/hub
205
205
To publish and subscribe to updates, we recommend using the [Laravel Mercure Broadcaster](https://github.com/mvanduijker/laravel-mercure-broadcaster) library.
206
206
Alternatively, see [the Mercure documentation](mercure.md) to do it in pure PHP and JavaScript.
207
207
208
-
### Running Octane With Standalone Binaries
208
+
### Running Octane with Standalone Binaries
209
209
210
210
It's even possible to package Laravel Octane apps as standalone binaries!
0 commit comments