![]() |
Sergey Kornilov admin 8/24/2025 |
Did you make sure that $_ENV["mypassword"] actually holds the required value? |
C
|
Corrie De Wet 8/25/2025 |
Your environment variable name is: "test" and the value is "mypassword". |
J
|
Jan author 8/26/2025 |
Hi Corrie, the text above is a mistake. I've used the correct parameters:
But the error message remains ... |
![]() |
Sergey Kornilov admin 8/27/2025 |
@Jan, did you see my question? |
W
|
wpl 8/27/2025 |
Jan, did you make sure that ENV is listed in the "variables_order" section of your php.ini? ; This directive determines which super global arrays are registered when PHP Otherwise $_ENV will be empty. |
J
|
Jan author 8/28/2025 |
Sergey, the variable is visible in the console (CMD), I replaced the line $pwd = $_ENV["test"]; with this line $pwd = getenv('test'); Now it works fine. Thanks. |