Installation on Win2000Pro + Apache 2.0.46 + PHP 4.3.2. In "Manual PHP" by Bakken itc is written :
[quote] The path information part of the url after the PHP binary name, /secret/doc.html is conventionally used to specify the name of the file to be opened and interpreted by the CGI program. Usually some web server configuration directives (Apache: Action) are used to redirect requests to documents like http://my.host/secret/script.php to the PHP interpreter. With this setup, the web server first checks the access permissions to the directory /secret, and after that creates the redirected request http://my.host/cgi-bin/php/secret/script.php. Unfortunately, if the request is originally given in this form, no access checks are made by web server for file /secret/script.php, but only for the /cgi-bin/php file. This way any user able to access /cgi-bin/php is able to access any protected document on the web server. [/quote] I've no php4apache.dll or something like that, this is why I want to configure PHP as CGI script. My configuration files: - php.ini : cgi.force_redirect = 0 doc_root = ; nothing all other are standard settings - httpd.conf : ServerRoot "D:/Programy/Apache Group/Apache2" ServerName 127.0.0.1 DocumentRoot "D:/Programy/Apache Group/Apache2/htdocs" Action php-script "/cgi-bin/php" AddHandler php-script .php ScriptAlias /php/ "e:/php/" AddType application/x-httpd-php .php .php3 .htm .phtml Action application/x-httpd-php "/php/php.exe" all other are standard settings After reading manual this settings should be enough for PHP to work correctly as CGI script on Apache ?! The problem is: on my HD, there is a site: D:/Programy/Apache Group/Apache2/cgi-bin/php/as/a.php and in IE I want to open this site in two ways (as it is said in manual): 1. localhost/as/a.php - now I have to have a notice in access.log 2. localhost/cgi-bin/php/as/a.php - no notice about entry on site in access.log (this is why i turned off cgi.force_redirect = 0 and didn't set doc_root !!. ) But it isn't working !! In error.log depending on the request I've written above I've got different messages : first type of request: [Thu Jul 17 18:03:51 2003] [error] [client 127.0.0.1] File does not exist: D:/Programy/Apache Group/Apache2/htdocs/as second type of request: [Thu Jul 17 18:02:47 2003] [error] [client 127.0.0.1] script not found or unable to stat: D:/Programy/Apache Group/Apache2/cgi-bin/php/cgi-bin Why ??!! I've done everything what is written in manual but something must be wrong !! Did I make any mistake during configuration ?? Did I forget something ?! I want my PHP to work as it is said in this part of manual I've written above !! HELP :( -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php