Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FrankenPHP Configuration Instructions #9932

Draft
wants to merge 4 commits into
base: 11.x
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions octane.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<a name="frankenphp-configuration"></a>
## 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not exact. The system default is taken into account, but FrankenPHP uses the default system path (hardcoded in the PHP source code) which is /lib/php.ini. Most distributions change this default path to /etc, hence the confusion.

If you use the static binary (default with Octane), you can use /lib/php.ini or the root directory of the project. If you use the Docker image, you should use $PHP_INI_DIR. If you compile PHP by yourself, you can specify the path you want by passing --with-config-file-path option to ./configure.

This is documented here: https://frankenphp.dev/docs/config/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dunglas, I've rewritten to hopefully be a little more precise on this matter. Are you able to take a look and check if you think it covers it?


```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.

<a name="roadrunner"></a>
### RoadRunner

Expand Down