I just clean installed Apache 2.2.17 and PHP 5.3.4. For Apache selected Win32 installer, for PHP I selected x86 VC6 Thread Safe due to this, and I put Apache in C:\web\Apache2.2, and PHP in C:\web\libraries\PHP.
The thing is every time I try to hit a PHP page on localhost, I get this entry in my log files:
[Thu Dec 16 11:54:02 2010] [error] [client 127.0.0.1] File does not exist: C:/web/htdocs/web, referer: http://localhost/
DocumentRoot is C:\web\htdocs, and it works fine for normal .html files (it works!). But it seems Apache is redirecting all requests for .php pages.. to a subfolder called /web of htdocs. I don't get it.
All the PHP installer did was in httpd.conf:
ScriptAlias /php/ "C:/web/libraries/php/"
Action application/x-httpd-php "C:/web/libraries/php/php-cgi.exe"
And mime.types:
application/x-httpd-php php
application/x-httpd-php-source phps
Missing
Looks like the PHP people messed it up.
To get the ScriptAlias line above, I actually selected "Apache 2.2.x Module" in the PHP installer but it looks like it added PHP-CGI directives which was not what I want.
So naturally I chose "Apache CGI" to get it to configure for "Apache 2.2.x Module" ;)
Here's what I have in
httpd.conf
now:I'm not sure if this is entirely correct, but it works.