Here are the PHP related lines from my Appache2.0.43 httpd.conf file.

ScriptAlias /php4/ "E:/PHP4/"
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php /php4/php.exe

With this setup, all *.php and *.phtml files
are processed correctly, but when using an .htaccess
file in the same directory as the .phtml file, 
$REMOTE_USER is not set, even when
the userid and password were entered when
the file was accessed.

Contents of test.phtml file:
<html>
        <head><title>PHP Test</title></head>
                <body>
                <H1>PHP Test</H1>
<?php
                      echo "<BR>\$_SERVER[HTTP_HOST]="; echo $_SERVER["HTTP_HOST"];
                      echo "<BR>\$_SERVER[REMOTE_USER]="; echo $_SERVER["REMOTE_USER"];
                      echo "<BR>\$PHP_AUTH_USER="; echo $PHP_AUTH_USER;
                      echo "<BR>\$REMOTE_USER="; echo $REMOTE_USER;
                      echo "<BR>";
                      ?>
        </body></html>

[EMAIL PROTECTED] (Diego Fulgueira) wrote:

>Hi.
>I followed the instructions in the php manual to install php as CGI module
>under apache, under windows. I get the following message when requesting
>a php file:
>
>Invalid URI in request GET /mydir/myfile.php HTTP/1.1
>
>I believe this is because Apache is not getting the protocol:host part of
>the request
>(in this case: http://localhost/). I don't know why this happens.
>
>Something else: The PHP manual recommends adding the line:
>
>ScriptAlias /php/ "c:/php/"
>
>to the http.conf file. But I don't want ONLY the files under /php/  to be
>interpreted
>as scripts. Rather, I want ALL the files in my documentRoot directory to be
>interpreted as scripts.
>
>Any ideas? Thanks in advance


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to