php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64322 $_ENV{"PATH"} does not work
Submitted: 2013-02-28 14:20 UTC Modified: 2013-02-28 17:31 UTC
From: porton at narod dot ru Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.5Git-2013-02-28 (Git) OS: Debian Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: porton at narod dot ru
New email:
PHP Version: OS:

 

 [2013-02-28 14:20 UTC] porton at narod dot ru
Description:
------------
With Bash:

$ php -r 'echo $_ENV{"PATH"}, "\n";'
PHP Notice:  Undefined index: PATH in Command line code on line 1

The variable PATH is of course defined in my Bash.

Version info:

Debian Linux Wheezy

$ php --version
PHP 5.4.4-13 (cli) (built: Feb 19 2013 12:42:38) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

Test script:
---------------
php -r 'echo $_ENV{"PATH"}, "\n";'


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-28 17:31 UTC] reeze@php.net
Please make sure you ini setting 'E' for $_ENV
http://www.php.net/manual/en/ini.core.php#ini.variables-order

withouth 'E' $_ENV will not been filled with environment variables
 [2013-02-28 17:31 UTC] reeze@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC