php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51548 setting the php_auth_user using login form
Submitted: 2010-04-13 12:27 UTC Modified: 2010-04-13 12:38 UTC
From: ram at wiredhat dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.2.13 OS: windows xpsp2
Private report: No CVE-ID: None
 [2010-04-13 12:27 UTC] ram at wiredhat dot com
Description:
------------
for auth-login, i don't like to have pop-up box to enter the username/password. i like to enter the username/password in login-form.  

Test script:
---------------
<?
$username = "usa";
$password = "newyork";

if(($_POST['PHP_AUTH_USER'] == $username)&& ($_POST['PHP_AUTH_PW'] == $password))
  {  	
  	
     echo apache_setenv("PHP_AUTH_USER",$_POST['PHP_AUTH_USER']);
     echo apache_setenv("PHP_AUTH_PW",$_POST['PHP_AUTH_PW']);	
  	echo putenv("PHP_AUTH_USER =$_POST['PHP_AUTH_USER']");
	echo putenv("PHP_AUTH_PW = $_POST['PHP_AUTH_PW']");
	
  }  
?>

<form method="post">
<p>Username : <input type="textbox" name="PHP_AUTH_USER" id="PHP_AUTH_USER" /><br />
<p>Password : <input type="password" name="PHP_AUTH_PW" id="PHP_AUTH_PW" /><br />
<p>	<input type="submit" name="submit" />
</form>

Expected result:
----------------
by using the phpinfo(), we need to see the _SERVER['PHP_AUTH_USER'] = usa. 

Actual result:
--------------
by using the phpinfo(), '_SERVER['PHP_AUTH_USER'] ' is totally missed..  

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-13 12:38 UTC] degeberg@php.net
-Status: Open +Status: Bogus
 [2010-04-13 12:38 UTC] degeberg@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Aug 10 18:01:25 2020 UTC