|
8 | 8 |
|
9 | 9 | // Reading environment variables from $_SERVER (because $_ENV is not necessarily populated, depending on variables_order directive): |
10 | 10 |
|
11 | | -foreach ($_SERVER as $key => $value) { |
12 | | - if (strpos($key, 'PHP_INI_') === 0) { |
13 | | - $iniParam = substr($key, 8); |
14 | | - if ($iniParam !== 'SMTP') { |
15 | | - // SMTP is the only php.ini parameter that contains uppercase letters (!) |
16 | | - $iniParam = strtolower($iniParam); |
17 | | - } |
18 | | - $iniParam = str_replace('__', '.', $iniParam); |
19 | | - // Let's protect the value if this is a string. |
20 | | - if (!is_numeric($value) && $iniParam !== 'error_reporting') { |
21 | | - $value = '"'.str_replace('"', '\\"', $value).'"'; |
22 | | - } |
23 | | - echo "$iniParam=$value\n"; |
24 | | - } |
25 | | -} |
26 | | - |
27 | 11 | if (enableExtension('xdebug')) { |
28 | 12 | //echo "zend_extension=xdebug.so\n"; |
29 | 13 | echo "xdebug.client_host=".getenv('XDEBUG_CLIENT_HOST')."\n"; |
|
40 | 24 | //echo "extension=blackfire.so\n"; |
41 | 25 | echo "blackfire.agent_socket=tcp://$blackFireAgent:8707\n"; |
42 | 26 | } |
| 27 | + |
| 28 | +foreach ($_SERVER as $key => $value) { |
| 29 | + if (strpos($key, 'PHP_INI_') === 0) { |
| 30 | + $iniParam = substr($key, 8); |
| 31 | + if ($iniParam !== 'SMTP') { |
| 32 | + // SMTP is the only php.ini parameter that contains uppercase letters (!) |
| 33 | + $iniParam = strtolower($iniParam); |
| 34 | + } |
| 35 | + $iniParam = str_replace('__', '.', $iniParam); |
| 36 | + // Let's protect the value if this is a string. |
| 37 | + if (!is_numeric($value) && $iniParam !== 'error_reporting') { |
| 38 | + $value = '"'.str_replace('"', '\\"', $value).'"'; |
| 39 | + } |
| 40 | + echo "$iniParam=$value\n"; |
| 41 | + } |
| 42 | +} |
0 commit comments