|  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
 [2003-06-17 22:52 UTC] webmaster at kobrasrealm dot com
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 ( 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, 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-18 13:05 UTC]

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

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 15 08:01:24 2021 UTC