Re: PHP5 release HTTP Authentication not working on FreeBSD.

From: Date: Thu, 15 Jul 2004 20:09:43 +0000
Subject: Re: PHP5 release HTTP Authentication not working on FreeBSD.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190619@lists.php.net to get a copy of this message
known problem, will be fixed soon in 5.0.1 which should be released asap William Bailey wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Guys,
    I've just upgraded from 5.0 rc3 to 5.0 release on freeBSD (using the
ports) and now find that HTTP Authentication dosent work.
    Here is the test script that i am using:
<?php ~ error_reporting(E_ALL); ~ ini_set('display_errors', true); ~ if (! (isset($_SERVER['PHP_AUTH_USER']) || isset($_SERVER['PHP_AUTH_PW']) )) { ~ 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>"; ~ } ?>
    And here is the output that i get:
Notice: Undefined index: PHP_AUTH_USER in test.php on line 10 Hello ''. You entered pass as your password.
    As you can see PHP_AUTH_USER is on longer being set. Does anybody else
have this issue or know of a fix?   
- -- Regards,
    William Bailey.
    Pro-Net Internet Services Ltd.
    http://www.pro-net.co.uk/
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFA9o3ZzSfrYDJMXmERAmZqAKCunk+xl2w+RRIKOvbDTQEWjXbGCgCgxXsw DknafWhfiwLTYrusTzHl0gE= =IMNL -----END PGP SIGNATURE-----


« previous php.general (#190619) next »