Produktions-Env-Loading fuer echtes Webhosting ergaenzen
PHP-FPM/mod_php auf Shared Hosting erbt keine shell-exportierten Umgebungsvariablen wie der lokale Dev-Server. app/bootstrap.php laedt jetzt optional env.local.php (nicht eingecheckt, siehe env.local.example.php als Vorlage) und setzt die Variablen per putenv(), bevor irgendein app_env()/getenv()-Aufruf passiert. Greift jetzt auch fuer CLI-Skripte (migrate.php, grant-platform-admin.php) ueber scripts/dev-db.php.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once __DIR__ . '/../app/bootstrap.php';
|
||||
|
||||
function dev_required_env(string $name): string
|
||||
{
|
||||
$value = getenv($name);
|
||||
|
||||
Reference in New Issue
Block a user