0

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?

  • 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 01 '11 at 07:14

2 Answers2

3

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

AddHandler application/x-httpd-php .php
AndrewR
  • 166
  • 1
  • Hi how can we change htdoc folder out side of apache folder? –  Jul 01 '11 at 07:23
  • Just change parameter DocumentRoot in VirtualHost directive of your configuration file of site. http://httpd.apache.org/docs/2.2/vhosts/examples.html – Roman Sklyarov Sep 11 '14 at 10:08
2

Replace

application/x-httpd-php.php

by

application/x-httpd-php .php
  • May I know how to change htdoc folder from apahce? –  Jul 01 '11 at 07:22
  • What do you mean "from Apache"? Web interface? Using web-based file manager like PHPfileNavigator or by hosting administration system (webmin, cPanel...). – Roman Sklyarov Jul 01 '11 at 14:58