|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-22 14:13 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 18:00:01 2025 UTC |
Description: ------------ Http autentication doesnt works on Safari / MacOS. No authentication dialog is opened. (using code from documentation) 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: ---------------- authentication dialog, <p>Hello user123</p><p>Yoe entered test as your password.</p> Actual result: -------------- no authentication dialog. Text to send if user hits Cancel button