Running PHP: Unable to load dynamic library, Windows, Apache 2.2, php 5.2.11

This is becoming a very unpleasant problem. I am trying to perform a clean install of apache 2.2 and PHP 5.2.11. Everything seems to be configured correctly, but php modules are not starting ...

PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mcrypt.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0 

in php.ini

 include_path = ".;C:\Program Files (x86)\Apache Software Foundation\Apache2.2\php" extension_dir = ".;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/" 

All files are ... .dll files, such as ssleay32.dll, libmcrypt.dll, libmysql.dll, libeay32.dll, are installed on ...

C: / Program Files (x86) / Apache Software Foundation / Apache2.2 / php /

I also included them in the folder C: \ Windows \ System32

and even added C: / Program Files (x86) / Apache Software Foundation / Apache2.2 / php / to the window path.

I have no idea why this is not working, and it seems like a win-win situation. Anyone have any ideas on how to make everything work fine?

+7
windows php apache
source share
5 answers

Try the following:

 extension_dir = "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/" 

not starting with .;

+10
source share

Just for my future, if not. This is because PHP 5.2.13 runs on Windows on IIS 8.

I got the following error:

PHP Warning: starting PHP: cannot load the dynamic library 'C: \ Program Files (x86) \ PHP \ ext \ php_openssl.dll' - the specified module was not found.

From phpinfo() downloaded php.ini file was C:\Program Files (x86)\PHP\php.ini .

Extension Catalog:

 extension_dir ="C:\Program Files (x86)\PHP\ext" 

These were the last two lines of the php.ini :

 [PHP_SQLSRV] extension=php_sqlsrv_52_nts_vc6.dll [PHP_OPENSSL] extension=php_openssl.dll 

The php_openssl.dll and php_sqlsrv_52_nts_vc6.dll are located in the ext directory. php_openssl.dll not corrupted (this is the same file size as one on another computer that is running).

PHP will find sqlsrv dll but not openssl dll. I do not know why. No amount of IIS restart did anything.

The solution, until I know better, is to install the openssl.dll extension using the Windows PHP installer. You can restart the installer and select "Change", and it allows you to add or remove libraries. I do not see any difference in the file or php.ini file, but now the file is loading.

I suspect my problem was similar to this comment about installing OpenSSL on Windows :

At this point, when you start Apache, it will try to load php_openssl.dll, but if your setting is similar to mine, you will see an error. I prefer to start Apache manually, and the error appears in the dialog box: "Ordinal 4114 cannot be located in the dynamic link library LIBEAY32.dll." (I'm not sure if you would get this message if you started using Apache as a service). The Apache log also contains an error message indicating that php_openssl.dll could not be loaded, although this message does not name libeay32.dll. Welcome to the DLL Hell.

Libeay32.dll is included in the image because php_openssl.dll (as well as ssleay32.dll) depends on it. I think Apache first tries to programmatically load php_openssl.dll from the path specified by the extension_dir key. But then loading the so-called dependent DLLs is left to the Windows engine by default. If Windows detects an incompatible version of the dependent DLL, you will receive an error message.

I noticed errors in ssleay32.dll when trying to run php -i from the command line. I just assumed that it was not in the environment. IIS did not mention any ssleay32.dll errors in its logs.

+2
source share

You just uncomment extension_dir in php.ini

enter image description here

+1
source share

They had the same errors, but instead of copying files, they added the php folder to the system path and recounted the server.

0
source share

In Windows 8.1, there is a problem with the system PATH names that cannot be edited using the general editor, because this line is too long ...... and for the PHP module to load well, you need to determine the PHP path in the system environment.

ONLY one thing helped me: https://rix0rrr.imtqy.com/WindowsPathEditor/

0
source share

All Articles