14 responses to “Windows Apache PHP FastCGI Setup”

  1. Mitchel Haas

    Thanks Dimas!
    I’ve always ran php as an apache module, but since 5.3, the thread safe versions and the zend debuggers no longer agree. So like many other windows zend debugger users, I’m switching to CGI. I didn’t realize how much faster fastcgi is until I followed your excellent instructions and got it going.

    Thanks again for sharing!

    Mitchel Haas

  2. vrgfa

    With my existing apache 2.2.9 – I don’t know in this case Apache version matters – I installed php5.3.4 on my Vista box as you described. Everything worked fine, but only the non thread safe v6 version worked, the thread safe version broke with unmature end of script headers.
    V F

  3. khamla

    thank you very much for your information on installing fastcgi for apache.
    i run it on windows 7, everything fine as your recommend.
    khamla

  4. Jonathon Hill

    Thanks for documenting this. I have tried several times unsuccessfully to get this working, but this tutorial took the confusion out of the process.

    I am running Apache 2.2 with PHP 5.3.3 VC9 NTS on Windows 7.

  5. Jay Mann

    You dimas! ..I mean ‘da Man’. 🙂

    Worked great and fixed my ZendDebugger issue.

    I am running Apache 2.217 with PHP5.3.6 VC9 NTS on Win Vista.

    Thanks.

  6. gijs

    I am having issues getting this to work, everything works fine but my website keeps saying Forbidden when I try to access a .php file

    You don’t have permission to access /phpmyadmin/index.php on this server.

    it works fine with index.html files so I suppose something is wrong with the php installation or something else? but I already tried editing the apache config and googling a lot with no success…

    and yes I did do: DirectoryIndex index.php, idk how to fix this please help me.

  7. Mark

    This might be late but gijs might be missing the ExecCGI option in his httpd directory configuration

  8. Adam

    I found I had to add Indexes and ExecCGI options to and also to the directory block for the document root in order to make this work.

  9. Ed Hillis

    Thanks — very helpful!

  10. Tim

    Thanks for an easy-to-follow guide on this set-up. It is perfect for someone new to working with Apache.

    I am having trouble understanding one part. In the Installation section step 4, you say to unpack the FastCGI files and place the manual and modules folders in the Apache directory. Those directories already exist. Should I assume I am to move files from the FastCGI directories into these folders as they fit? Can you elaborate a bit on where exactly these files go, please?

    Thanks!

  11. Panayiotis Velisarakos

    Thanks a lot! This is the only guide that actually worked for me.

  12. Ted

    I am beginning to return to web programming after a substantial hiatus (due to extreme illness) and am working on setting up Apache 2.4 along with all else I need for web programming. First question: “Has anything of significance changed in these packages or the server since this was written?”

    Most of my web programming experience, from years ago, was done using Perl (which I am getting back to), but I also have an interest in PHP, python and ruby. I never had set up anything for cgi programming except mod_cgi. But I want to experiment with FastCGI, so this page is priceless to me. But what is the relation between this package (mod_fcgid) an modules I have seen, but not yet downloaded, such as mod_FastCGI, mod_perl, mod_php, mod_ruby, mod_python, &c. I want to strengthen my understanding of PHP and learn ruby and python.

    I also want to do a bit of experimenting, testing and comparing each package that purports to provide FastCGI services (on my Windows box) with the ancient default of mod_cgi.

    Also, I need to know, if anyone here knows, whether or not the FastCGI libraries will work properly with products out there such as WordPress.

    Any guidance will be appreciated. Thanks.