note 73942 added to features.http-auth

From: Date: Fri, 16 Mar 2007 15:28:44 +0000
Subject: note 73942 added to features.http-auth
Groups: php.notes 
Request: Send a blank email to php-notes+get-124522@lists.php.net to get a copy of this message
My sincere thanks to: webmaster at kratia dot com 21-Feb-2007 01:53 The principle is to not allow an invalid PHP_AUTH_USER to exist. The following easy peasy example using Oracle is based on his simple genius: /////////////////////////////////////////////////////////////// // // do_html_header // // This function outputs the html header for the page. // ////////////////////////////////////////////////////////////////// function initialize_session() { $err=error_reporting(0); $connection=oci_connect($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'],$databasename) ; error_reporting($err); if (!$connection) { header('WWW-Authenticate: Basic Realm="ZEIP1"'); header('HTTP/1.0 401 Unauthorized'); echo "Login Cancelled'; exit; } .. Normal Code.. .. } ---- Server IP: 194.109.193.76 Probable Submitter: 83.80.8.16 ---- Manual Page -- http://www.php.net/manual/en/features.http-auth.php Edit -- https://master.php.net/note/edit/73942 Del: integrated -- https://master.php.net/note/delete/73942/integrated Del: useless -- https://master.php.net/note/delete/73942/useless Del: bad code -- https://master.php.net/note/delete/73942/bad+code Del: spam -- https://master.php.net/note/delete/73942/spam Del: non-english -- https://master.php.net/note/delete/73942/non-english Del: in docs -- https://master.php.net/note/delete/73942/in+docs Del: other reasons-- https://master.php.net/note/delete/73942 Reject -- https://master.php.net/note/reject/73942 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124522) next »