php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11181 PHP_AUTH_USER and PHP_AUTH_PW are not set
Submitted: 2001-05-29 22:48 UTC Modified: 2002-07-12 16:27 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: grisha at kasenna dot com Assigned:
Status: Not a bug Package: iPlanet related
PHP Version: 4.0.5 OS: Solaris 7
Private report: No CVE-ID: None
 [2001-05-29 22:48 UTC] grisha at kasenna dot com
I'm using php 4.0.5 with iPlanet 4.1 and Solaris 7. THe simple PHP Authentication script, that works on the same machine with Apache does not work with iPlanet:

if(!isset($PHP_AUTH_USER)) {
    Header("WWW-Authenticate: Basic realm=\"My Realm\"");
    Header("HTTP/1.0 401 Unauthorized");
    echo "Enter User Name\n";
    exit;
  } else {
	if(!isset($PHP_AUTH_PW)) {
    	Header("WWW-Authenticate: Basic realm=\"My Realm\"");
	    Header("HTTP/1.0 401 Unauthorized");
    	echo "Enter password\n";
	    exit;
	} else {
  		if (($PHP_AUTH_USER!="user") || ($PHP_AUTH_PW!="password")) {
				Header("WWW-Authenticate: Basic realm=\"My Realm\"");
    			Header("HTTP/1.0 401 Unauthorized");
	    		echo "Not authorized\n";
    			exit;
		}		
	}	
  }

It acts as if "Cancel" is pressed. PHP_AUTH_USER and PHP_AUTH_PW are not set after pressing "OK" button. I looked into $HTTP_SERVER_VARS array there is no HTTP_AUTH_USER or PHP_AUTH_USER there.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-30 05:53 UTC] sniper@php.net
I'm not at all familiar with NSAPI, but maybe this article
would help you:

http://www.dotvoid.com/article_condensed.php?itemID=48

Try searching it for php4_auth_trans..
Please let me know if you succeed.

--Jani

 [2001-05-30 14:10 UTC] grisha at kasenna dot com
Thanks, but this page is identical to http://www.php.net/manual/en/install.netscape-enterprise.php. I checked every line in obj.conf. PHP works fine, but authentification does not. 
 [2002-07-12 16:27 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 11:01:26 2019 UTC