php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24236 CGI Mode doesn't honor PHP_AUTH_*
Submitted: 2003-06-17 22:52 UTC Modified: 2003-06-18 13:05 UTC
From: webmaster at kobrasrealm dot com Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 4.3.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: webmaster at kobrasrealm dot com
New email:
PHP Version: OS:

 

 [2003-06-17 22:52 UTC] webmaster at kobrasrealm dot com
Description:
------------
my host used Linux and has PHP 4.3.1 installed (because 4.3.2 isn't compatible with phpsuexec). For a while, everything was running smoothly. I built my own site control panel that sets a cookie when you're logged in from the .htaccess so that a link appears on the main site (http://www.kobrasrealm.com) when there's something the Control Panel can do (e.g. Add/Edit Game who's Description I am currently viewing).

However, it suddenly stopped honoring $PHP_AUTH_USER and I tried $_SERVER['PHP_AUTH_USER']. I logged in and then went to a phpinfo file I made to see if I mistyped it, and it wasn't there.

I reported it to my host, and they claimed that PHP_AUTH_* is not available in CGI mode.

Reproduce code:
---------------
$auser = $PHP_AUTH_USER;
echo("You are logged in, $auser");

Expected result:
----------------
You are logged in, Kobra

Actual result:
--------------
You are logged in, 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-18 13:05 UTC] sniper@php.net
http://www.php.net/features.http-auth

User $_SERVER['REMOTE_USER'], that will work.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC