From b8b11ef25600baa835d364e724f2e948dc1eb88b Mon Sep 17 00:00:00 2001 From: Alexander Stecher <45872305+AlliBalliBaba@users.noreply.github.com> Date: Mon, 25 Nov 2024 22:47:18 +0100 Subject: [PATCH] FrankenPHP: Allow running Octane without artisan command (#968) * FrankenPHP: Set defaults for APP_BASE_PATH, APP_PUBLIC_PATH and MAX_REQUESTS. * Checks env before server. * style.ci * Update frankenphp-worker.php --------- Co-authored-by: a.stecher Co-authored-by: Taylor Otwell --- bin/frankenphp-worker.php | 2 +- src/Commands/stubs/frankenphp-worker.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/frankenphp-worker.php b/bin/frankenphp-worker.php index e3a342366..b003f91e4 100644 --- a/bin/frankenphp-worker.php +++ b/bin/frankenphp-worker.php @@ -32,7 +32,7 @@ $worker = null; $requestCount = 0; -$maxRequests = $_ENV['MAX_REQUESTS'] ?? $_SERVER['MAX_REQUESTS']; +$maxRequests = $_ENV['MAX_REQUESTS'] ?? $_SERVER['MAX_REQUESTS'] ?? 1000; $requestMaxExecutionTime = $_ENV['REQUEST_MAX_EXECUTION_TIME'] ?? $_SERVER['REQUEST_MAX_EXECUTION_TIME'] ?? null; if (PHP_OS_FAMILY === 'Linux' && ! is_null($requestMaxExecutionTime)) { diff --git a/src/Commands/stubs/frankenphp-worker.php b/src/Commands/stubs/frankenphp-worker.php index 1ac1c2352..8608d9a83 100755 --- a/src/Commands/stubs/frankenphp-worker.php +++ b/src/Commands/stubs/frankenphp-worker.php @@ -1,3 +1,7 @@