php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55265 function getenv()
Submitted: 2011-07-22 07:31 UTC Modified: 2011-08-04 08:54 UTC
From: unasivp at hotmail dot com Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 5.3.6 OS: windows XP SP3
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: unasivp at hotmail dot com
New email:
PHP Version: OS:

 

 [2011-07-22 07:31 UTC] unasivp at hotmail dot com
Description:
------------
function getenv() return NULL string.

Test script:
---------------
<?php
echo "[".getenv("username")."]<br>";
?>

Expected result:
----------------
[]


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-22 07:38 UTC] pajoye@php.net
What are you trying to explain? When an environment variable does not exist, NULL 
is returned.
 [2011-08-02 13:31 UTC] unasivp at hotmail dot com
I found in some website say the function getenv("username") return windows login user name.
 [2011-08-02 13:41 UTC] pajoye@php.net
It is not necessary exposed. But check phpinfo to see it, also there is no bug in 
getenv > bogus.
 [2011-08-02 13:41 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2011-08-02 13:41 UTC] pajoye@php.net
.
 [2011-08-02 14:28 UTC] unasivp at hotmail dot com
I know it not a bug but I want to know how to do that. Because I develop the intranet application and I need to use window logon user name to logon in my application.
 [2011-08-02 16:42 UTC] pajoye@php.net
What you may need is NTLM support. It will let you use the authenticated user. 
Check out there, a couple of php libs to do it.
 [2011-08-04 08:54 UTC] unasivp at hotmail dot com
Thanks, 
and can you explain me about.
1. what lib which I could load in.
2. what NTLM need.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 13:01:33 2025 UTC