I can't successfully configure the apache and php configuration files, can anybody help me in this way?

  1. Apache 2.2.16 (win32-x86-no_ssl.msi) was installed into “C:\Apache2.2 “location.

  2. Then PHP 5.3.3 (VC9 x86 Thread Safe) zip file was downloaded and extracted on “C:\php” location.

  3. From “C:\php” I renamed the “php.ini-development” file into “php.ini”

  4. “php.ini” file was opened with notepad, and modified as:

      doc_root = "C:\Apache2.2\htdocs"
      extension_dir = "C:\php\ext"
  5. The following lines were added to the Apache's configuration file “httpd.conf”:

      LoadModule php5_module "C:/php/php5apache2_2.dll"
      AddType application/x-httpd-php .php
      PHPIniDir "C:/php"

    N.B.: Thanks all for comments and answer, but I can't reply none your comments, I don't know why. May be I'm not privileged to put any comment as I'm new here (is it the case?)! That's why I'm to edit my post to reply you all. Tell me what can I do?

@ jer.salamon: do you want me to post full httpd.conf file? It'll be longer then!

@ davr: the server started first, but when I configured those files, its never started again

@jer.salamon: did you mean keeping this way:

          doc_root =
          extension_dir = "ext"

It not yet restared!

  • 1
    Do you have any more info you can give? What does the apache error log say? – Khai Aug 19 '10 at 17:46
  • can you post in a script window the whole httpd.conf file – jer.salamon Aug 19 '10 at 18:05
  • @Sharifhs You told us what you have done, but you haven't said anything at all what went wrong. Does the server start? It serving pages? Are PHP files being run or just returned as source code? Is it giving any errors? etc etc etc. Without more info, no real help can be given besides wild guesses. – davr Aug 19 '10 at 18:25
  • Please post the relevant contents of your apache error log file. It is most probaly located at C:\Apache2.2\logs\YOUR_HOST_NAME-error_log – Alec T Jan 18 '12 at 10:39

try leaving your doc_root blank and putting ./etc for your extensions.


I had this problem for ages until I spotted something on apachelounge http://www.apachelounge.com/viewtopic.php?t=3180

A couple of posts mention disabling certain extensions, so I had a go. For me it was postgre, commenting out this line in php.ini worked:

Hope it does for you too.


Can you give a better explanationof what you mean by by "can't be restarted" ? Do you get any error messages? Have you checked the error log file?

Try starting a shell (cmd.exe) and running 'httpd -t' (tests config file - any messages? What about 'httpd -X' (NB unless the bin dir is on your path you'll need to chdir to where httpd.exe is located first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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