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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC