Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

muzak's avatar
Level 2

Octane + FrankenPHP - ini issues

I am using forge + laravel + octane and frankenphp. The Max File Upload Size is not being respected when using octane.

I had the same issue when running this locally, but I was able to edit the php.ini file. I also had to put in a php.ini file in my base_path for the settings to be picked up by caddy.

When I check the php.ini file on my Laravel Forge server, I see that the right settings are set.

upload_max_filesize post_max_size

Any other idea what I could be missing?

0 likes
2 replies
LaryAI's avatar
Level 58

When dealing with file upload size issues in a Laravel application using Octane and FrankenPHP, there are a few areas to check and ensure that the settings are correctly applied:

  1. Verify PHP Configuration: Ensure that the php.ini file on your server has the correct settings for upload_max_filesize and post_max_size. You can verify this by creating a simple PHP script to output the current configuration:

    <?php
    phpinfo();
    ?>
    

    Access this script through your web server to confirm the settings are as expected.

  2. Check Octane Configuration: Since you're using Laravel Octane, ensure that Octane is not overriding or ignoring these settings. Octane uses Swoole or RoadRunner, which might have their own configurations. Check your config/octane.php file for any relevant settings.

  3. Caddy Configuration: Since you mentioned using Caddy, ensure that Caddy is not imposing its own limits. Check your Caddyfile for any directives related to request size limits. You might need to add or adjust the max_request_body_size directive:

    {
        max_request_body_size 100MB
    }
    

    Adjust the size according to your needs.

  4. Environment Variables: Sometimes, environment variables can override PHP settings. Check your .env file for any variables that might be affecting upload sizes, such as UPLOAD_MAX_FILESIZE or POST_MAX_SIZE.

  5. Restart Services: After making changes to configuration files, ensure that you restart the necessary services. This includes PHP-FPM, Caddy, and any Octane workers. This ensures that all changes are applied.

  6. Check for Errors: Look at your server logs for any errors or warnings that might give more insight into why the settings are not being respected. This can include PHP error logs, Caddy logs, or Laravel logs.

By following these steps, you should be able to identify and resolve the issue with the file upload size not being respected in your Laravel application using Octane and FrankenPHP.

muzak's avatar
Level 2

Hmm I think I figured it out. Locally I had set the PHP_INI_SCAN_DIR to my app base path but I had not for the forge environment.

That being said this feels hacky. What is the proper way to get my result?

Please or to participate in this conversation.