I'm using Centos 6.2 and PHP 5.3.9.
I am trying to build PHP with OpenSSL extension in order for me to be able to use PEAR Mail/SMTP over SSL.
During configuration of PHP I get this in the error_log (for both options mentioned below):
checking for pkg-config... /usr/bin/pkg-config configure: error: Cannot find OpenSSL's <evp.h>
This is my ./config
./configure --enable-intl --with-gettext --with-gettext=/usr/sbin --with-apxs2=/usr/sbin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-imap=/path/to/imap_src --with-libdir=lib --with-kerberos --with-imap-ssl --with-openssl=/usr/lib/openssl
As option 2 I have also tried with
None is working and that's a bit strange since evp.h is located in /usr/include/openssl
When using --with-openssl=shared I get this at start-up of apache/httpd (no errors upon making php)
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/openssl.se' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/openssl.se: cannot open shared object file: No such file or directory in Unknown on line 0
This is the error message from PEAR Mail (this is for successfull making using --with-openssl= shared):
Failed to connect to ssl://mail.smicloud.se:465 [SMTP: Failed to connect socket: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (code: -1, response: )] email@example.com
I don't post my php-code since I am positive the problem is related to the system setup.
I have searched around a lot and tried the most things I found. Following are just a couple of examples:
yum install openssl-devel yum install libcurl-devel
"yum list installed | grep openssl" gives
openssl.i686 1.0.0-20.el6_2.2 @updates openssl-devel.i686 1.0.0-20.el6_2.2 @updates
Any suggestions for how to solve it or how to find additional information about the setup that will help me understand the problem better?
I'm a newbie working with these kind of things. If there is a better way of downloading and compiling needed extensions I would be more than happy to know. The reason why I do like this is simply because I don't know any other way. Can it be done just using yum?