I am trying to configure PHP 5.3 on already installed Apache 2.0 on windows machine, using the guidelines mentioned on -

So far I have done -

LoadModule php5_module "C:/PHP/php5apache2.dll"
AddType application/x-httpd-php .php

PHPIniDir "C:/PHP"

All these at the right spots in httpd.conf file.
I have apache in C:/Apache & PHP in C:/PHP directories. I have also downloaded the right php5apache2.dll and placed at the right directory. Restarted the server.
But when I try to start the Apache, it does not start and throws the error - "The requested operation could not be completed"

Thank you.

Hi, check the Apache error log, you should find an extended error message, if you have doubts post the errors here.

Hi, thank you for the quick response. I tried that already but since the Apache is not even starting its not writing anything in the error log. or atleast in this case.
what is more helpful is in this case, if I comment the LoadModule php5_module C:/PHP/php5apache2.dll, apache can start.

Try to start Apache with the -t argument, this will:

Run syntax tests for configuration files only. The program immediately exits after these syntax parsing tests with either a return code of 0 (Syntax OK) or return code not equal to 0 (Syntax Error). If -D DUMP_VHOSTS is also set, details of the virtual host configuration will be printed. If -D DUMP_MODULES is set, all loaded modules will be printed.

In practice run httpd -t from the command line. Otherwise check if there is the read-only attribute on the php5apache2.dll file, and remove it.

ok, I tried to execute Apache.exe from the command line and it throws error as 'syntax at line <line-number> -
LoadModule php5_module "C:/SERVER/PHP/ext/php5apache2.dll"


Where I could check the directory path is also correct.

Ok, the LoadModule directive does not require opening and closing tags as < />. So, it should not be:

<LoadModule php5_module "C:/SERVER/PHP/ext/php5apache2.dll" />

But simply:

LoadModule php5_module "C:/SERVER/PHP/ext/php5apache2.dll"

You can place the directive at the end of the httpd.conf file. If instead you want to check if a module is loaded then you can use the IfModule directive, for example:

<IfModule mod_rewrite.c>
    # rules


thank you for your response.I have used it without closing tags only < />
, in the above comment, I was just trying to put the code tags.
So I have used it like below -

LoadModule php5_module "C:/SERVER/PHP/ext/php5apache2.dll"

Also tried without double quotes like -
LoadModule php5_module C:/SERVER/PHP/ext/php5apache2.dll

I found somwhere online that, it could be a dependency issue for php5apache2.dll


regarding the dependency issue it could be, if Apache is 2.2 and the library is for Apache 2.0. In this case you need php5apache2_2.dll.

thank you cereal once again, but I have noticed already that there are different dll files for different versions of apache.
I have apache 2.0.65, so I have downloaded correct dll from apachelounge, named as 'php5apache2.dll'

edit: although the filename is php5apache.dll they have clearly mentioned in the accompanying readme.txt file that it works only with apache 2.2.x & PHP 5.2
Despite lot of search on apachelounge, couldn't find the correct dll file for PHP 5.3.2 & Apache 2.0. I would appreciate if you could help with such link.

thank you serial for your support, actually I did the same thing. Earlier I haved installed PHP using windows installer file, apparantly it didnt contain apache dll. So I uninstalled everything and installed PHP using the same zipped files you mentioned above and Apache 2.2 as well. Configured using the similar instructions and I could make it work.

I'm glad you've solved, bye! :)


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.