|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-05-30 05:53 UTC] sniper@php.net
[2001-05-30 14:10 UTC] grisha at kasenna dot com
[2002-07-12 16:27 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 07:00:02 2025 UTC |
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.