Learn how to a build a cloud-first strategyRegister Now


How do I get PHP dll to load into apache server running under Vista?

Posted on 2007-09-29
Medium Priority
Last Modified: 2013-12-13
when launching Apache server, receive following in Vista error log:
Cannot load C:/PHP/SAPI/php5apache2.dll into server: The specified module could not be found.     dll is definitely there. If I try loading php5apache2_2.dll instead, it says (don't remember exactly) it can't find a SAPI structure inside the module.  Apache works without PHP but won't start if I try to load it. Have user account control turned off. Already copied php5ts.dll to system directory and set extension_dir in the php.ini file. Examples in Schafer's book about this showed dll files in an SAPI subdirectory but when I unzipped php win32 software, the dlls were together with most of the other files instead of in a sub-directory.
Question by:AlanKellogg
LVL 27

Expert Comment

by:Jason Watkins
ID: 19987111

Have you tried this utility?



Accepted Solution

theevilworm earned 2000 total points
ID: 20072631
move php5apache2.dll and php5apache2_2.dll to C:\PHP. the dll requires php5ts.dll and probably some other dlls present in c:\php (if default installation method was used).

If you are running apache 2.2 use php5apache2_2.dll.
the line in httpd.conf should look like this (for apache 2.2):
LoadModule php5_module "c:/php/php5apache2_2.dll"

Author Comment

ID: 20090493
Had already put the DLLs in the PHP directory at the top of the C drive. This is the line that didn't work:
LoadModule php_module c:\PHP\php5apache2.dll
and this is the line from the solution that DID:
LoadModule php5_module "c:/php/php5apache2_2.dll"
in the configuration file, of course.

Expert Comment

by:Robert Silver
ID: 36317178
These instructions really do not work. It wasted a lot of my time and frankly it did not explain what lines of code need to be added to the Apache httpd.conf file which I found to be:
located in the module definition section:

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

But even that failed to work. I even tried to add  LoadFile "C:/PHP/php5apache2.dll as a LoadFile but
that failed too,, I am going to try Apache 1.3 we shall see if that works.
Someone needs to modify this question better This is an installation annoyance!
I think the only way to truly get this working is to re-compile and build but the above just makes you think you can get by with the Apache and PHP  msi  s available and that is just not true, unless I missed something here!

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question