LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   PHP with OpenSSL Support Failing (https://www.linuxquestions.org/questions/linux-server-73/php-with-openssl-support-failing-776948/)

pinstripe 12-19-2009 05:40 PM

PHP with OpenSSL Support Failing
 
Hi everyone,

Longtime reader, first poster. I've just run into an annoying problem. I can't get OpenSSL support in PHP.

This is how I'm configuring and building PHP:

Code:

# ./configure  --prefix=/usr --enable-sockets --with-mysql=/usr/local/mysql --with-zlib-dir=../zlib-1.2.3 --with-apxs=/usr/local/apache/bin/apxs --with-mcrypt=../libmcrypt-2.5.8 --enable-mbstring --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/lib/libjpeg.so --enable-exif --enable-soap=shared --with-mhash=../mhash-0.9.9.9 --with-openssl --with-openssl-dir=../openssl-0.9.8k
# make
# make install

PHP configures and installs correctly. OpenSSL 0.9.8k was configured and compiled with shared libraries. I am flabbergasted. There is even the ext/openssl directory in the PHP installation directory:

Code:

# find / -name "openssl" | grep php
/usr/install/php-5.3.0/ext/openssl

What have I done wrong?

Code:

# php -r "phpinfo();" | grep ssl
OpenSSL support => disabled (install ext/openssl)
# php -r "phpinfo();" | grep php.ini
Configuration File (php.ini) Path => /usr/lib
Loaded Configuration File => /usr/lib/php.ini


pinstripe 12-19-2009 06:08 PM

When compiling, the only thing I see regarding OpenSSL is this:

/usr/install/php-5.3.0/ext/openssl/openssl.c: In function 'php_openssl_x509_from_zval':
/usr/install/php-5.3.0/ext/openssl/openssl.c:1161: warning: passing argument 1 of 'PEM_ASN1_read_bio' from incompatible pointer type

jstephens84 12-19-2009 09:36 PM

what happens when you create a script with
Code:

<?php
  phpinfo();
?>

does it say anything about ssl. try looking through your php ini file for anything that may say php_openssl.

jstephens84 12-19-2009 09:40 PM

forgot to add you might have to use ssl on your apache server also. If you installed it you can use a2enmod ssl.

pinstripe 12-20-2009 08:17 AM

Yeah, I have mod_ssl working fine, it's just PHP. As for phpinfo(), relevant output is:

# php -r "phpinfo();" | grep ssl
OpenSSL support => disabled (install ext/openssl)


All times are GMT -5. The time now is 12:39 AM.