Oscar Gomez
Oscar Gomez

Reputation: 18488

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)

extension=openssl.so

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.

-Oscar

Upvotes: 2

Views: 6232

Answers (2)

Michael Ben-David
Michael Ben-David

Reputation: 21

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

Upvotes: 2

shadowhand
shadowhand

Reputation: 3201

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

dl('openssl');

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.

Upvotes: 2

Related Questions