Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Apache server to develop web applications in php . I have one Basic doubt .

Now to execute the php scripts from the browser should I add just this line to httpd.conf

LoadModule php5_module "c:/wamp/bin/php/php5.3.0/php5apache2_2.dll"

or should I add both the lines

LoadModule cgi_module modules/
LoadModule php5_module "c:/wamp/bin/php/php5.3.0/php5apache2_2.dll"

Can someone explain the difference . If only one is required then which is faster ?

share|improve this question
up vote 1 down vote accepted

If all you're running is PHP scripts within the Apache server, then you only need the php5_module line. On the other hand, if you're running CGI scripts (either PHP or another language) then you need the cgi_module line as well.

share|improve this answer

You don't need to load the cgi_module if you are only developing in PHP.


LoadModule php5_module "c:/wamp/bin/php/php5.3.0/php5apache2_2.dll"

is sufficient

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.