Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 want to configure PHP5 on apache2.2 server.

I added

LoadModule php5_module "c:/php/php5apache2_2.dll"
AddHandler application/x-httpd-php.php
# configure the path to php.ini
#PHPIniDir "c:/php"

these lines on my apache httpd.conf file. But it is not restarting apache server.

What is the problem? Can anybody help me?

share|improve this question

migrated from Jul 1 '11 at 9:30

This question came from our site for professional and enthusiast programmers.

What do you mean by "is not restarting" - does it crash when you try to restart it? If yes, there should be an error in error.log telling you more – Pekka 웃 Jul 1 '11 at 7:14
up vote 3 down vote accepted

You are missing the space after application/x-httpd-php

AddHandler application/x-httpd-php .php
share|improve this answer
Yes you are right. thanks a lot :) – learner Jul 1 '11 at 7:15
Hi how can we change htdoc folder out side of apache folder? – learner Jul 1 '11 at 7:23
Just change parameter DocumentRoot in VirtualHost directive of your configuration file of site. – sorx00 Sep 11 '14 at 10:08




application/x-httpd-php .php
share|improve this answer
thanks now its working fine ;) – learner Jul 1 '11 at 7:22
May I know how to change htdoc folder from apahce? – learner Jul 1 '11 at 7:22
What do you mean "from Apache"? Web interface? Using web-based file manager like PHPfileNavigator or by hosting administration system (webmin, cPanel...). – sorx00 Jul 1 '11 at 14:58

Your Answer


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