Re: Apache w/ PHP, Please Help!
| From: | Gabor Hojtsy | Date: | Thu, 18 Dec 2003 08:51:44 +0000 |
| Subject: | Re: Apache w/ PHP, Please Help! | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-22614@lists.php.net to get a copy of this message | ||
Hi Jon!
Since this question has no relation to the PHP.net website or subsites, the webmaster email address is not the suitable place to ask about it. You should ask PHP related support questions at php-general@lists.php.net
Happy holidays!
Gabor Hojtsy
Jon C wrote:
I am running FreeBSD 5.1, Apache 2.0.48 and PHP version 4.3.4 and I am having a problem. I installed Apache correctly, php correctly and edited the httpd.conf file to this: ScriptAlias /usr/local/bin/ "/usr/local/bin/" AddType application/x-httpd-php .php Action application/x-httpd-php "/usr/local/bin/php" I have made pages ending in .php and they work fine But I have made a login.php file with the following code: <?php $auth = 0; if (($PHP_AUTH_USER == "user" ) && ($PHP_AUTH_PW == "pass" )) $auth = 1; if ( $auth != 1 ) { header( 'WWW-Authenticate: Basic realm="Authorization Required!"' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required!'; exit; } echo 'Success!'; ?> When I execute this file, it brings up the login box But when I enter the correct username and password it just keeps popping up and not "accepting" them. Is there anyway to fix this error? Thanks, Jon. _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca