Cannot load php5apache2_2.dll

cannot load c: /PHP5/php5apache2_2.dll into the server. I get this error when running apache 2.2 on a Windows XP machine.

can anyone understand what could be the problem. I see that php5apache2_2.dll is missing in the c: / php5 folder.

+7
source share
13 answers

First you have to download the .dll file ( php5apache2_2.dll ) then put it in your extensions directory.

Then edit the php.ini file, find the text:

; extension = php5apache2_2.dll

// and change y to extension = php5apache2_2.dll

if the text is missing, place the line yourself. Then restart apache and download the extension.

PD: you can see where your extension directory is located, looking for the text "extension_dir" in your php.ini, sometimes it looks like this: extension_dir = C: \ php \ extensions

Hope this helps you if you donโ€™t attach the error here, you can find the error log file in apache / error / error.log or something like that.

+2
source

For me, php5apache2_4 .dll-php-5.4-win32.zip from apachelounge worked and using the file "php5apache2_4.dll" from the unpacked folder "PHP 5.4.8". I had apache 2.3.4 (32-bit) from apachelounge.com and php 5.4.9 (32-bit) from windows.php.net installed on my Win 7 (64-bit).

The DLL worked despite the mismatch 5.4.8 - 5.4.9.

Corresponding changes within "php.ini" and "httpd.conf" should be supported in accordance with this useful guide.

Sincerely.

+4
source

You must download the dll file from the PHP distribution package . And look at three ways to configure PHP to work with Apache 2.x.

You can configure PHP as an Apache handler in <[apache_home]> \ conf \ httpd.conf as follows:

 LoadModule php5_module "c:/php/php5apache2_2.dll" AddHandler application/x-httpd-php .php #configure the path to php.ini PHPIniDir 'C:\php\' 

NOTE. To avoid an error when starting apache, the php ini dir path must be in single quotes with a backslash. Remember to end it with a backslash.

+2
source

Here's how I got it for GO:

  • Created folder C: \ Apache
  • Downloaded and installed http-2.2.22-win32-x86-no-ssl.msi During installation, enter localhost as the Network domain and server name
  • From the browser typing url http://localhost/ , and the page came up with โ€œIt Worksโ€ (I donโ€™t know if there is a God, but accepted it as a good sign :)

  • Created folder C: \ PHP

  • Download and install php-5.2.17-Win32-VC6-86.msi
  • Created a new file in notepad with the following:
  • Saved in Apache / htdocs folder as phpinfo.php
  • From the browser typing url http://127.0.0.1/phpinfo.php
    It did not work (i.e., it did not run the .php file).

  • Hmm, yes, you have to restart Apache in order to see updates your own configuration file
    Start, Apache, Management ..
    -> generated an error that could not be found in C: \ Apache \ php5apache2_2.dll

  • Well, I found it in C: \ PHP, and I copied it to C: \ Apache \
    Start, Apache, Management ..
    -> an error was generated about a problem with the PHPINIDir directive on line 495 of section C: /Apache/conf/httpd.conf

  • This is fixed by editing this line in the above file on

     PHPIniDir "C:/PHP/php.ini" 
  • I tried restarting Apache again, launched a test file in the browser. However, this did not work :(

  • I remembered this before and decided to restart the computer. The Apache server was restarted (or started)

  • Run the test file again .. THIS WORKS!

Please note that in some of the above I may have mixed up some slashes back and forth Good luck!

+2
source

Please verify that you must download the PHP version of VC6 to use Apache. If you use VC9, Apache does not start. This is clearly indicated on the site.

http://in3.php.net/manual/en/install.windows.manual.php

+1
source

You receive an error due to the fact that c: /PHP5/php5apache2_2.dll does not come with the non-streaming security of the version of PHP that you probably downloaded. Two options:

  • Download and install the thread-safe version of PHP, and you will get everything you need.

  • If the non-thread version is important for what you want to execute, download the zip package from the thread safe version and get only the DLL there.

Which version: For Apache Server 2.2, you need to download the PHP 5.4 stream stream, which comes with both php5apache2_2.dll and php5apache2_4.dll. Some earlier versions probably also work. PHP 5.5 only comes with php5apache2_4.dll, which will not be compatible with your version.

Download links here on the official website: http://windows.php.net/download/ .

+1
source

For me, the problem was resolved by replacing the php5apache2_2.dll file from another site, since the file downloaded from the php.net site was damaged.

I already had the php5apache2_2.dll file on my version 2.2 and PHP version 5.3.13, so I just copied this file to my version 5.4.35 and worked.

I did not have to bother with apache configuration as other people suggest.

Another thing I did was install Visual C ++ Redistributable for Visual Studio 2008 for my x64 machine running Windows 7 Ultimate Edition. I don't think this helped, since I already had the x86 version and worked with my previous version of PHP, but it is part of the action I took.

+1
source

None of the above suggestions helped me. I tried replacing the php5apache2_2.dll file and restarting everything, but got the same error. I ended up removing Apache, MySQL, and PHP, removing the path variables, and then installed WampServer. If everything was up and running in less than 5 minutes.

By the way, I deleted PHP by simply deleting the folder in Program Files, since it did not appear in the Add or Remove Programs. I also deleted the remaining Apache and MySQL folders after the deletion.

0
source

There is even a file, and apache shows an error that this file does not exist, install the Microsoft C ++ redistributable package. Please note that you need to install the 2008 version, and then 2010. Install both packages, not just the 2010 version.

0
source

I had a similar problem. I found out after a certain Youtube tutorial that if you go over and edit the httpd.conf file while Apache is running ... it will mess. Make sure you install Apache first ... then turn it off and then install php later. Then it should edit the httpd.conf file. This Youtube tutorial solved my problem. http://www.youtube.com/watch?v=UKbEzmMliNM Hope it helps. I installed MySQL and it works too ... but I had to install the .NET Framework.

0
source

Instead, you need to install http-2.2.22-win32-x86-no-ssl.msi .

0
source

I had the same error. I installed x64 version of Apache and x86 version of php. After a few searches, I found that this would not work.

So I had to install the x64 (threadafe) version of PHP. After that, Apache works fine. :) Hope this helps!

0
source

If php5apache2_4.dll is missing :

My problem was that php5apache2_4.dll was not included in PHP install zip. It only includes the version of Thread Safe PHP 5.4.38

http://windows.php.net/downloads/releases/php-5.4.38-Win32-VC9-x86.zip

0
source

All Articles