Vince
Vince

Reputation: 36

Upgrade php cig mode to fastcgi on windows apache server issue

The production server is based on windows 2008, and use the cgi php mode, but when the requests become frequently, and all the webs slow down. The ping time is just about 3s.

We use thinkphp, any other reasons result in the problem ?

I want to change the php mode from cgi to fastcgi, may be will better. Here is what i have done: 1.Download the mod_fcgid.so, and put it in the module dir. 2.

LoadModule fcgid_module modules/mod_fcgid.so
Should i comment this line below?

LoadModule cgi_module modules/mod_cgi.so

3.config it.


    
    AddHandler fcgid-script .fcgi .php
    # Where to look for the php.ini file?
    FcgidInitialEnv PHPRC        "c:/php"
    # Set PHP_FCGI_MAX_REQUESTS to greater than or equal to FcgidMaxRequestsPerProcess
    # to prevent php-cgi process from exiting before all requests completed
    FcgidInitialEnv PHP_FCGI_MAX_REQUESTS      1000
    # Maximum requests a process should handle before it is terminated
    FcgidMaxRequestsPerProcess       1000
    # Maximum number of PHP processes
    FcgidMaxProcesses             15
    # Number of seconds of idle time before a php-cgi process is terminated
    FcgidIOTimeout             120
    FcgidIdleTimeout                120
    #Path to php-cgi
    FcgidWrapper "c:/php/php-cgi.exe" .php
    # Define the MIME-Type for ".php" files
    AddType application/x-httpd-php .php
    


    
    Options Indexes FollowSymLinks ExecCGI
    Order allow,deny
    Allow from all
    AllowOverride All
    

Have i done it correctly? Anyone can give me a plan? After that, i restart the server ,but failed, occoured error code 1. Can someone help me?

Upvotes: 0

Views: 516

Answers (1)

starit
starit

Reputation: 1

It seems that you are using Windows, but mod_fcgid.so is for Linux

You should download mod_fcgid.dll rather than mod_fcgid.so

You can download here :http://www.fastcgi.com/drupal/?q=node/3 Note:Win32 DLL-1.3/2.0

Upvotes: 0

Related Questions