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

Posted on 2007-09-29
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

    Have you tried this utility?

    LVL 3

    Accepted Solution

    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

    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.
    LVL 2

    Expert Comment

    by:Robert Silver
    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!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now