Skip to content

Commit d9aedee

Browse files
committed
Added a note about the dangers of dumping $_SERVER and $_ENV
1 parent d6c1f44 commit d9aedee

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

best_practices/configuration.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ they have nothing to do with the application's behavior. In other words, your
4242
application doesn't care about the location of your database or the credentials
4343
to access to it, as long as the database is correctly configured.
4444

45+
.. caution::
46+
47+
Beware that dumping the contents of the ``$_SERVER`` and ``$_ENV`` variables
48+
or outputting the ``phpinfo()`` contents will display the values of the
49+
environment variables, exposing sensitive information such as the database
50+
credentials.
51+
4552
.. _best-practices-canonical-parameters:
4653

4754
Canonical Parameters

configuration/external_parameters.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ the following:
123123
124124
fastcgi_param DATABASE_URL "mysql://db_user:db_password@127.0.0.1:3306/db_name";
125125
126+
.. caution::
127+
128+
Beware that dumping the contents of the ``$_SERVER`` and ``$_ENV`` variables
129+
or outputting the ``phpinfo()`` contents will display the values of the
130+
environment variables, exposing sensitive information such as the database
131+
credentials.
132+
126133
Constants
127134
---------
128135

0 commit comments

Comments
 (0)