Skip to content

Commit c58e7a3

Browse files
committed
[cookbook][external_parameters] Adding note about using environment variables and the terminal
1 parent 0bdf994 commit c58e7a3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cookbook/configuration/external_parameters.rst

+9
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ the following ``VirtualHost`` configuration:
4141
The example above is for an Apache configuration, using the `SetEnv`_
4242
directive. However, this will work for any web server which supports
4343
the setting of environment variables.
44+
45+
Also, in order for your console to work (which does not use Apache),
46+
you must export these as shell variables. On a Unix system, you can run
47+
the following:
48+
49+
.. code-block:: bash
50+
51+
export SYMFONY__DATABASE__USER=user
52+
export SYMFONY__DATABASE__PASSWORD=secret
4453
4554
Now that you have declared an environment variable, it will be present
4655
in the PHP ``$_SERVER`` global variable. Symfony then automatically sets all

0 commit comments

Comments
 (0)