logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Config help: PHP as FASTcgi on Windows2003 OS
Author
hydn79



Joined: 28 Apr 2007
Posts: 19

PostPosted: Mon 07 May '07 4:19    Post subject: Config help: PHP as FASTcgi on Windows2003 OS Reply with quote

Problem
---------------------------------------------------------------
I'm trying to switch from PHP installed as module (Apache) to PHPinstacll as FASTcgi - on Windows 2003 server. I've downloaded mod_fcgid-2.1-w32.zip from (apachelounge) and also just in case http://www.fastcgi.com/dist/ (mod_fastcgi-2.4.2-AP20.dll) but seems it's for Apache 2.0 and not 2.4. Let me know.

Question
---------------------------------------------------------------
What changes do I need to make to my Apache httpd.conf and Php.ini (cut and pasted below) in order to run PHP 4.4.6 as FASTCGI:

ADMIN NOTE: php.ini and httpd.ini contents have been removed.
Please see the Forum Rules which prohibit posting entire configuration files.

The original contents can be viewed in this crosspost to the Apache Users list


Php.ini
---------------------------------------------------------------
...Removed...
httpd.conf
-----------------------------------------------------------
...Removed...

Info:
Server 1 Web Server:
Windows 2003 Standard R2
2x dual core xeon 5140 2.33Ghz, 3GB RAM,
RAID 1 36GB OS & WebServer HDs
Apache 2.2.4
PHP 4.4.6 (Also tried 5.2.1)
Avg mem usgae: 400 - 500MB of 3GB
Avg CPU usage: 60% - 100%

Server 2 DB server:
Windows 2003 Standard R2
2x dual core xeon 5140 2.33Ghz, 3GB RAM,
36 GB Non RAID OS drive, D: = RAID 1 36GB SCSI HDs
Mysql 4.1.22
lighttpd 1.4.15
Avg mem usage: 0.9GB - 1.2GB of 3GB
Avg CPU usage: 5% - 15%

My Goal
---------------------------------------------------------------
To lower CPU usage on Web Server by tonight (for tomorrow's - Moday - traffic) since I've been reading around that Fastcgi performs noticeably better. PHP has been eating up CPU as traffic has increased a lot in last few months. Hardware has been upgraded and would like to compliment with FASTcgi.

Thanks for your help.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7357
Location: Germany, Next to Hamburg

PostPosted: Mon 07 May '07 16:56    Post subject: Reply with quote

Some basic example. You need to edit the pathes Wink

Code:

LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>

   IPCCommTimeout 40
   IPCConnectTimeout 10
   MaxProcessCount 8
   OutputBufferSize 64
   ProcessLifeTime 240
   MaxRequestsPerProcess 500
   
   Alias /fcgi/ "/server3/fcgi/"
   <Directory /server3/fcgi>   
      AddHandler fcgid-script .php
      Options Indexes FollowSymLinks ExecCGI
      FCGIWrapper "/server3/php/php-cgi.exe" .php
      AllowOverride all
      Order allow,deny
      Allow from all
      Satisfy any
   </Directory>

</IfModule>


By the way. There are a lot of topics about that in this forum... using the forum search would bring the same result as asking here Exclamation
Back to top
hydn79



Joined: 28 Apr 2007
Posts: 19

PostPosted: Tue 08 May '07 2:29    Post subject: Reply with quote

Searched an read for 2 days. But than I also saw that generic cut paste in another thread.
Back to top


Reply to topic   Topic: Config help: PHP as FASTcgi on Windows2003 OS View previous topic :: View next topic
Post new topic   Forum Index -> Other Software