|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-08-24 03:39 UTC] michaelw at webcentral dot com dot au
Description:
------------
Hi,
PHP HTTP Authentication under Sun One Webserver 6.0 (and presumably any iPlanet variant) doesn't seem to work correctly.
The PHP_AUTH_USER and PHP_AUTH_PW variables don't seem to get set. (This is with Safe Mode disabled).
Additionally, with Safe Mode enabled, I cannot determine the username or password entered by the user.
Reproduce code:
---------------
<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>";
}
?>
Expected result:
----------------
Under apache, the output is:
Hello testing.
You entered 123 as your password.
(when username is testing and 123 is password)
Under SunOne, the username/password box just keeps redisplaying.
Actual result:
--------------
Under SunOne, the username/password box just keeps redisplaying.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 19:00:01 2025 UTC |
Two things you can do at this time, the remove of the safe_mode security check for NSAPI is under discussion: a) Remove the "if" clause from nsapi.c: php_handle_auth_data(pblock_findval("authorization", rq->headers) TSRMLS_CC); b) Disable Safe-Mode only for this application. With NSAPI you can do this in vserver.obj.conf: * Create a new Style in Server Manager and assign this style to the PHPMyAdmin directory * Change the obj.conf in that style (<Object name="bla">) and add the php4_execute-service as in the "default" object; but add a safe_mode=0 to the end of the line (this is an additional php.ini value)