PHP, Apache and FastCGI under Windows
Posted: Fri Jul 10, 2009 2:24 pm
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:
To configure fastcgi, and I have ExecCGI in the directory options of course, however a script such as:
Will not run under fcgi or cgi whereas a similar ruby script:
will run as a .cgi but not as a .fcgi.
I expect I may misunderstand how FastCGI is supposed to work :\
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
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
Code: Select all
#!/Server/PHP/php-cgi
<?php
header('Content-type: text/html');
echo 'Test';
?>
Code: Select all
#!/Server/Ruby/bin/ruby
puts "Content-type: text/html"
puts
puts "Hai2u"
I expect I may misunderstand how FastCGI is supposed to work :\