Unable to load dynamic library php_mysql, php_pgsql, php_mcrypt
Tech-Today

Unable to load dynamic library php_mysql, php_pgsql, php_mcrypt


This problems are often encountered on new php installation.

Solution:

1.) Add these lines to httpd.conf


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


2.) In your php.ini, set
a.) session save directory: session.save_path = C:\php-5.2.10\session_dir
b.) upload directory: upload_tmp_dir = C:\php-5.2.10\upload_dir
c.) extension: extension_dir = C:\php-5.2.10\ext
Note: change according to where you extract your php package

3.) Uncomment depending on your needs:
a.) ;extension=php_mysql.dll
b.) ;extension=php_pgsql.dll
c.) ;extension=php_mcrypt.dll
d.) ;extension=php_mbstring.dll

4.) In your environment variable set:
PHPRC = C:\php-5.2.10
How: Right click My Computer->Properties->Advanced->Environment Variables->User Variables->New

5.) Create a new folder where you will put your 3rd party dll needed by the system (libmysql.dll, libmcrypt.dll). In my case: c:\lib\dll.

6.) Move the lib* dll (libmysql.dll, libmcrypt.dll) in c:\lib\dll - the extension that you will used.

7.) Add the c:\lib\dll to your System Variables.
How: Right click My Computer->Properties->Advanced->Environment Variables->System Variables->New

8.) Restart your computer.

Start apache and look in the apacheinstalldir/logs directory

What you might see in error log:

1.) If php issue an error on failed to load mbstring, then there's a problem with your extension directory.

2.) If there's no error about mbstring but on mcrypt and/or mysql then there's a problem with the c:\lib\dll, please make sure that you have added c:\lib\dll to your system path.




- Solving The Php Startup: Unable To Load Dynamic Library Bug
Okay first I'm no expert in apache or php but I guess writing about this bug might help someone. Yes I've installed perhaps tens of times apache php mysql, but everytime I did I encountered several errors, like the error defined above. Well first...

- Php Extension "curl" Must Be Loaded - Php Warning: Php Startup: Unable To Load Dynamic Library 'c:\\php-5.2.14\\ext\\php_curl.dll' - The Specified Mo
I've recently setup apache/php/mysql (separate installs) on a new laptop which is powered by Windows 7 and would like to setup magento. I encountered an old familiar problem which I forgot long time ago. So I'm blogging the solution now so next...

- Phpmyadmin - The Connection Was Reset . The Connection To The Server Was Reset While The Page Was Loading
Error: The connection was reset The connection to the server was reset while the page was loading. * The site could be temporarily unavailable or too busy. Try again in a few moments. * If you are unable to load any pages, check your computer's...

- Magento - 500 Internal Error
Server: 1and1 hosting After fixing the database issue, I found myself trap with: 1.) front end - I got 500 Internal Error 2.) back end - out of memory error To keep it short here are my solutions: 1 & 2.) I remember doing these things: a.) rename...

- Unable To Load Mcryt, Pdo, Curl In Windows Apache Server
I encountered this errors in setting up a Magento store and playing I've found the solutions and now I'm sharing it In your php.ini file (could be in apache/bin or php installation folder - depending on your installation). Uncomment the following...



Tech-Today








.