Tutorial :How to load openssl.so dynamic library in PHP 5.2.1


I recently installed MAMP version 1.6 on my MAC OS 10.5.7. Now I am running a script to connect to a site using ssl.

After some research, I added the following line to my php.ini(under the extensions part)


However When I reestart my Apache server I get this Warning:

[15-Jul-2009 16:30:39] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/openssl.so' - (null) in Unknown on line 0

I checked and in fact there is no openssl.so in that folder, am I missing something?. Do I need to recompile php for it to show?. How can i accomplish that?. Any help will be greatly aprecciated.

Thank you.



You can try using the dl function to dynamically load the openSSL extension:


It is highly likely that MAMP does not have openSSL support enabled, in which case you might want to consider using macports to install your LAMP stack. You can find out if MAMP has openSSL support by adding this to a PHP file:

phpinfo();  exit();  

And look for a configuration line that starts --with-openssl.


Note: dl() is deprecated as of PHP 5.3.0 and will be removed in 6.0.0.

See: http://www.php.net/manual/en/function.dl.php

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »