From 2da75beeb844d6f36f15f09d8102a91d2bcd5940 Mon Sep 17 00:00:00 2001 From: Oliver Scase Date: Mon, 7 Oct 2024 10:55:27 +0200 Subject: [PATCH 1/4] Feat: add information about FrankenPHP ini config --- octane.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/octane.md b/octane.md index 999360a1ea..2dff4a801a 100644 --- a/octane.md +++ b/octane.md @@ -137,6 +137,23 @@ services: You may consult [the official FrankenPHP documentation](https://frankenphp.dev/docs/docker/) for more information on running FrankenPHP with Docker. + +## Configuring FrankenPHP + +When using FrankenPHP with Laravel, note that the default system `php.ini` does not apply to the FrankenPHP worker environment. To configure PHP settings, create a `php.ini` file in your project's root directory: + +```ini +# php.ini +memory_limit = 512M +upload_max_filesize = 100M +post_max_size = 100M +``` + +FrankenPHP will use these settings for your Laravel application, allowing environment-specific configurations without affecting system-wide PHP settings. + +> [!NOTE] +> Restart your FrankenPHP worker for changes to take effect. + ### RoadRunner From c833c0fa30940d3ee2df8434771c8e722b69f024 Mon Sep 17 00:00:00 2001 From: Oliver Scase Date: Wed, 9 Oct 2024 12:25:01 +0200 Subject: [PATCH 2/4] Fix: implement more specific and accurate information regaarding frankenphp ini configuration --- octane.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/octane.md b/octane.md index 2dff4a801a..5b481c55a9 100644 --- a/octane.md +++ b/octane.md @@ -138,9 +138,11 @@ services: You may consult [the official FrankenPHP documentation](https://frankenphp.dev/docs/docker/) for more information on running FrankenPHP with Docker. -## Configuring FrankenPHP +#### Configuring FrankenPHP -When using FrankenPHP with Laravel, note that the default system `php.ini` does not apply to the FrankenPHP worker environment. To configure PHP settings, create a `php.ini` file in your project's root directory: +When using FrankenPHP with Laravel, note that in order for you to modify the `php.ini` variables, it will search for a `php.ini` file in either the `/lib` directory or in the same directory as the binary (this is in the project root folder by default). + +To configure PHP settings, create a `php.ini` file in either of these places and add the desired settings. For example, to increase the memory limit and file upload size, you can add the following to your `./php.ini` file: ```ini # php.ini @@ -149,10 +151,13 @@ upload_max_filesize = 100M post_max_size = 100M ``` -FrankenPHP will use these settings for your Laravel application, allowing environment-specific configurations without affecting system-wide PHP settings. +When using the Docker image, you can specify the `$PHP_INI_DIR` environment variable. Doing so will make FrankenPHP scan for and load `$PHP_INI_DIR/*.ini`. + +You can read more about this behaviour in the [FrankenPHP configuration documentation](https://frankenphp.dev/docs/config/). + > [!NOTE] -> Restart your FrankenPHP worker for changes to take effect. +> You must restart your FrankenPHP worker for changes to take effect. ### RoadRunner From 9b688596c7cfaf5dbabc31341be9ccae6749ae10 Mon Sep 17 00:00:00 2001 From: Oliver Scase Date: Wed, 9 Oct 2024 12:29:15 +0200 Subject: [PATCH 3/4] Fix: rephrase to be clearer and more precise --- octane.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/octane.md b/octane.md index 5b481c55a9..1c155c0b86 100644 --- a/octane.md +++ b/octane.md @@ -138,11 +138,11 @@ services: You may consult [the official FrankenPHP documentation](https://frankenphp.dev/docs/docker/) for more information on running FrankenPHP with Docker. -#### Configuring FrankenPHP +#### Configuring FrankenPHP with Laravel -When using FrankenPHP with Laravel, note that in order for you to modify the `php.ini` variables, it will search for a `php.ini` file in either the `/lib` directory or in the same directory as the binary (this is in the project root folder by default). +When integrating FrankenPHP with Laravel, modifying `php.ini` settings requires placing the `php.ini` file in one of two locations: either the `/lib` directory or the same directory as the binary (by default, the project root). -To configure PHP settings, create a `php.ini` file in either of these places and add the desired settings. For example, to increase the memory limit and file upload size, you can add the following to your `./php.ini` file: +To adjust PHP configuration, create a `php.ini` file in one of these locations and define your settings. For example, to increase the memory limit and file upload size, you can add the following to your `./php.ini` file: ```ini # php.ini @@ -151,13 +151,12 @@ upload_max_filesize = 100M post_max_size = 100M ``` -When using the Docker image, you can specify the `$PHP_INI_DIR` environment variable. Doing so will make FrankenPHP scan for and load `$PHP_INI_DIR/*.ini`. - -You can read more about this behaviour in the [FrankenPHP configuration documentation](https://frankenphp.dev/docs/config/). +If you're using the Docker image, you can set the `$PHP_INI_DIR` environment variable. FrankenPHP will then scan and load configuration files from `$PHP_INI_DIR/*.ini`. +For more details, refer to the [FrankenPHP configuration documentation](https://frankenphp.dev/docs/config/). > [!NOTE] -> You must restart your FrankenPHP worker for changes to take effect. +> After making changes to `php.ini`, restart your FrankenPHP worker for the updates to take effect. ### RoadRunner From d85021a70138bd3f8e64d6ac212bdf4b859e72ee Mon Sep 17 00:00:00 2001 From: Oliver Scase Date: Wed, 9 Oct 2024 15:34:55 +0200 Subject: [PATCH 4/4] Update octane.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kévin Dunglas --- octane.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octane.md b/octane.md index 1c155c0b86..d4001877e0 100644 --- a/octane.md +++ b/octane.md @@ -151,7 +151,7 @@ upload_max_filesize = 100M post_max_size = 100M ``` -If you're using the Docker image, you can set the `$PHP_INI_DIR` environment variable. FrankenPHP will then scan and load configuration files from `$PHP_INI_DIR/*.ini`. +If you're using the Docker image, you must store your `php.ini` in the directory specified in the `$PHP_INI_DIR` environment variable. FrankenPHP will then scan and load configuration files from `$PHP_INI_DIR/*.ini`. For more details, refer to the [FrankenPHP configuration documentation](https://frankenphp.dev/docs/config/).