Bug #1044: REMOTE_USER env var not imported when script called via form

From: Date: Thu, 07 Jan 1999 23:58:50 +0000
Subject: Bug #1044: REMOTE_USER env var not imported when script called via form
Groups: php.dev 
Request: Send a blank email to php-dev+get-3384@lists.php.net to get a copy of this message
From: rene@vtwebwizard.com Operating system: Solaris 2.6 PHP version: 3.0.6 PHP Bug Type: Misbehaving function Bug description: REMOTE_USER env var not imported when script called via form Hi folks, I'm seeing a problem where the CGI environment variable REMOTE_USER is not being imported when a PHP script is being called from a form. If you execute the script as a link it works fine. Save the following script into a file called "remote_user.php3" and it will demonstrate the bug. Note, you'll need to create an Apache password protected directory to have the REMOTE_USER variable set to something. Apache, v1.3.3 PHP v3.06 with MySQL & track_vars. Thanks, Rene <html><head><title>REMOTE_USER bug in PHP3</title></head> <body bgcolor=white> <center><form action="remote_user.php3" method=post> <input type=hidden name=CalledFromForm value=1> <table border=1> <tr><th>Hit button to call this file from a form</th></tr> <tr><th><input type=submit value="Submit"></th></tr> <tr><th>Follow link to call this file via link</th></tr> <tr><th><a href="remote_user.php3">bug.php3</a></th></tr> <? if ($CalledFromForm) { echo("<tr><th>Called from Form</th></tr>\n"); } else { echo("<tr><th>Called by Link</th></tr>\n"); } echo("<tr><th>HTTP_HOST = $HTTP_HOST<br>\n"); echo(" REMOTE_USER = $REMOTE_USER<br>\n"); echo(" REMOTE_ADDR = $REMOTE_ADDR\n"); echo("</th></tr>\n"); ?> </table> </form></center></body></html> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3384) next »