Re: "File not found" error under Apache 2.2 when it try to loadmodule php5apache2.dll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



from:
http://www.apachelounge.com/forum/viewtopic.php?t=570

One of the biggest topics here at Apache Lounge is running PHP on Apache. It is a topic that is constant and for some reason often confused. Confused namely by varying ways to accomplish the same thing. The following has been tested numerous times, and seems (at least so far) to be easy to follow.Mr. Green

ExclamationIF YOU INSTALLED APACHE USING A MSI FILE THENExclamation (otherwise skip down to CONTINUE section): I have not tested Apache Software Foundation (ASF) MSI installation applications lately, but the last time I tested the MSI FAILED to remove to some things that can cause problems later on during the Un-Install process. BEFORE you UN-INSTALL the MSI file, open a command prompt and navigate to the BIN folder of Apache. Now, uninstall the service:

httpd -k uninstall

Now that the service is removed, uninstall Apache and then ALL PHP entries (files [php5ts.dll and others depending on what each person has done in the past] that you copied from where ever to where ever - usually into the Windows\System32 folder).

ArrowCONTINUE:
Install the Microsoft VC++ Redistributable. The reason for this is because it is NOT included in the latest versions of Windows; and Steffen's builds are compiled using Microsoft Visual C++ 2005. The Redistributable can be downloaded at the link below:

http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en

Download httpd-2.2.2-win32-x86-ssl.zip from http://www.apachelounge.com/download/

Unzip this ZIP file in a new folder called something like C:\Apache2. Then, read the file named Read Me First !!.txt. It will tell you how to setup the service for Apache. If you want or need ApacheMonitor you can create shortcuts however you like. Before installing ANYTHING else, ensure Apache will start. After you validate that Apache starts, stop it before proceding.

If you are still with me, now download PHP 5.x from PHP.net you want this file: php-5.x.xx-Win32.zip (where x relates to the latest stable version number)

Extract the contents of this file and move the contents to where you intend to use PHP such as C:\PHP5.

NEXT, overwrite the php5apache2.dll with Steffen's version - READ the 'ReadMe' file for possible changes:

php5apache2.dll-php5.1.x.zip from http://www.apachelounge.com/download/


Navigate to the PHP folder and edit the php.ini-recommended. FIND the extension_dir directive and change so that it properly locates the EXT folder:

extension_dir = "C:\php5\ext"

Save the file as php.ini.

Add the folder that you put the PHP files into in the PATH ENVIRONMENT (System Properties | Advanced | Environment Variables | System variables | Path).

Example:
Variable name: Path
Variable value: C:\php5;%SystemRoot%\system32;.....

DO NOT WORRY with coping files over to the Windows folders, the reason for this to begin with is because Windows folder is already in the Path. Since you have added the PHP folder to the Path you do not need to copy or move files to the Windows folder. This will make upgrading PHP simpler as well and allows you to keep PHP all together. To upgrade PHP in the future, all you need to do is delete the contents of the PHP folder, and then extract the contents of the new version into the PHP folder.

Finally, this should be the last step, edit the Apache CONF file with:

LoadModule php5_module "c:/php5/php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php-source .phps
# configure the path to php.ini
PHPIniDir "c:/php5"

This is how I put together WAMP, and I do it often (web application tester).

I hoped this helped.




Laurent PIERRE wrote:
Hello,

I'm under WinXP SP2, with server Apache 2.2 installed and working. I've installed the latest version of PHP and I've modified my httpd.conf file to add these lines :

LoadModule php5_module php/php5apache2.dll
AddType application/x-httpd-php .php

My Php install folder is behind my main apache folder.
When I restart Apache server, I obtain this error

Cannot load the E:/Web/Apache22/PHP/php5apache2.dll into server. Specified module could not be found.

Of course, this path exists and file too. I can see it. I've tried with all lower case. I've quoted path too... It's completly crazy,
but I cannot understand what kind of subtility there is.

Maybe, someone could be help  me.
I'll appreciate infinitly.

Thank  you for your help.

Laurent


[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux