PHP, Apache and FastCGI under Windows

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
Minty
Forum Newbie
Posts: 6
Joined: Sat Jun 27, 2009 7:46 pm

PHP, Apache and FastCGI under Windows

Post 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 :\
User avatar
akuji36
Forum Contributor
Posts: 190
Joined: Tue Oct 14, 2008 9:53 am
Location: Hartford, Connecticut

Re: PHP, Apache and FastCGI under Windows

Post 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
Minty
Forum Newbie
Posts: 6
Joined: Sat Jun 27, 2009 7:46 pm

Re: PHP, Apache and FastCGI under Windows

Post 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.
Post Reply