This isn’t a server/env var you need to “fix” — it’s a module incompatibility. below are 3 options
What’s happening
- In PrestaShop 8.x, Symfony’s Dotenv constructor signature was: new Dotenv(false); // bool $usePutenv
- In PrestaShop 9 (Symfony upgraded), the constructor signature changed to: new Dotenv(string $envKey = 'APP_ENV', string $debugKey = 'APP_DEBUG');
The ps_edition_basic module still calls new Dotenv(false) (old style), so PHP throws:
Argument #1 ($envKey) must be of type string, bool given
That’s why you get the 500/ERR_BAD_RESPONSE. The Dotenv files being “new in v9” isn’t the issue—the module code is outdated for v9.
1) Disable the offending module
Via FTP/SSH: rename the folder to disable it:
- modules/ps_edition_basic → modules/ps_edition_basic.DISABLED
- Clear cache
- Reload BO/FO. If it loads, you’ve confirmed the problem.
2. Patch the module (temporary)
If you want to keep it active until there’s an update, edit:
modules/ps_edition_basic/src/Controller/AdminPsEditionBasicPsAcademyController.php
Around line ~32 you’ll see something like:
- use Symfony\Component\Dotenv\Dotenv; // ... $dotenv = new Dotenv(false); // old signature → breaks on PS 9
- Change to either of these (both OK on Symfony used by PS 9):
- $dotenv = new Dotenv(); // simplest // or $dotenv = new Dotenv('APP_ENV', 'APP_DEBUG'); // explicit keys
3) Removing ps_edition_basic on PS 9
ps_edition_basic is tied to the “Basic Edition” experience and has had several PS-version quirks. On PS 9, it’s safe (and recommended) to uninstall/remove it if you’re not explicitly relying on its features. (note you can not uninstall it, in option 1 you can just rename it.
Long term: update or remove ps_edition_basic for PrestaShop 9 compatibility.