Click to See Complete Forum and Search --> : [Resolved] Apache2 PHP4 & PHP5


bubblenut
07-04-2004, 10:39 AM
Just tried setting up my test server as per this (http://bazzinet.info/WindowsWebserver.html) tutorial so that I could have both php4 and php5 running at the same time. The problem I have come accross is this. After I have installed Apache2 and unpacked the phps all seems to work fine. I can open html files and images but, even though no error is reported regarding the mo_alias I cannot run any php files. I get 400 Bad Request error. The exact error from the apache logs is

[Sun Jul 04 14:23:08 2004] [error] [client 127.0.0.1] Invalid URI in request GET /index.php HTTP/1.1


I am assuming this is to do with the mod_alias stuff but I can't figure out what the problem is as there is no error when I start up Apache. The mod_alias module is loaded.

If you need me to run more tests or provide more log info please let me know.

Thanks
Bubble

bubblenut
07-04-2004, 11:10 AM
Don't know what the problem was but I've managed to sort it out by running PHP4 as a module, using the following lines in the httpd.conf

LoadModule php4_module "c:/Webserver/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php


and php5 as a cgi using the following lines


<IfModule mod_alias.c>
ScriptAlias /php5/ "C:/Webserver/php5/"
AddType application/x-httpd-php5 .php5
Action application/x-httpd-php5 "/php5/php-cgi.exe"
</IfModule>


HTH Someone
Bubble