Page 1 of 1

PHP, Apache and FastCGI under Windows

Posted: Fri Jul 10, 2009 2:24 pm
by Minty
It's best not to ask why I want to use FastCGI instead of the 'php5_module', but a short answer would be "because I can".

Which brings me on to being unable to do it :?

I have mod_fastcgi installed as far as I can tell (it shows up in a 'httpd.exe -t -D DUMP_MODULES') but I'm really not sure how to configure apache to handle .php scripts with fastcgi, or even how to configure a generic '.fcgi' script (with '#!C:\PHP\php.exe') to run properly.

I have scoured the interblag for answers to no avail (damn unix seems to have it a lot easier :( ) so any help on this would be greatly appreciated.

Edit:

Right now I have:

Code: Select all

 
LoadModule fastcgi_module modules/mod_fastcgi.dll
AddHandler fastcgi-script .fcgi
LoadModule cgi_module modules/mod_cgi.so
AddHandler cgi-script .cgi
 
To configure fastcgi, and I have ExecCGI in the directory options of course, however a script such as:

Code: Select all

 
#!/Server/PHP/php-cgi
<?php
header('Content-type: text/html');
echo 'Test';
?>
 
Will not run under fcgi or cgi whereas a similar ruby script:

Code: Select all

 
#!/Server/Ruby/bin/ruby
puts "Content-type: text/html"
puts
puts "Hai2u"
 
will run as a .cgi but not as a .fcgi.

I expect I may misunderstand how FastCGI is supposed to work :\

Re: PHP, Apache and FastCGI under Windows

Posted: Wed Jul 15, 2009 2:33 pm
by akuji36
Try this link. Link goes to an installer which loads

php, mysql, and apache no need to configure lots

of items. php runs fast.

http://www.apachefriends.org/en/index.html

Re: PHP, Apache and FastCGI under Windows

Posted: Sun Sep 06, 2009 11:46 am
by Minty
Thank you for the link, however I am familiar with XAMPP etc.

I should clarify what the end-game here is: running PHP and Ruby (not necessarily rails!) on a single Apache configuration. The way I've decided to approach this is to run PHP with mod_php or whetever it's called (php5apache2_2.dll) and ruby with fastcgi, since I understand cgi is fairly slow.

At the moment I'm living with cgi because fastcgi seems to be a complete bitch to get working properly on windows.