Closed
Description
$_ENV is empty in my app which is running with php app/console server:run
I need it for accessing external variables described here
http://symfony.com/doc/current/cookbook/configuration/external_parameters.html
so I can use
$ export SYMFONY__DATABASE__USER=user123
// parameters.yml
user: "%database.user%"
Solution for adding external env variables into PHP build-in server is described here
http://stackoverflow.com/questions/13784116/setting-environment-variables-with-the-built-in-php-web-server
I solved it by adding '-d variables_order=EGPCS' in ServerRunCommand.php:95
$builder = new ProcessBuilder(array(PHP_BINARY, '-d variables_order=EGPCS', '-S', $input->getArgument('address'), $router));
Metadata
Metadata
Assignees
Labels
No labels