Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OpenSSL support => disabled (install ext/openssl)

9,443 views
Skip to first unread message

Bob

unread,
Apr 3, 2011, 10:44:18 PM4/3/11
to
Ive spent several hours trying to figure out why I cannot get
php working with openssl. I configure php-3.5.6 with the following
(on Fedora 13):

configure --prefix=/opt/php536 --with-apxs2=/opt/apache2217ssl/bin/
apxs --enable-shared --enable-session --enable-libxml --with-libxml-
dir=/opt/libxml2 --with-mysql --enable-pcntl --enable-sysvshm --enable-
sysvsem --with-openssl=/usr

I had to make --with-openssl=/usr just to get past a evp.h include
error. It configures fine now with the above configure line. After a
successful make, I run:

php -r "phpinfo();" | grep -i openssl
and get:
OpenSSL support => disabled (install ext/openssl)

Can anyone tell me whats wrong and how I fix it? I even tried going
back to older
php versions without luck, same issue.

Also my apache config is setup already for ssl in case it matters:
configure --prefix=/opt/apache2217ssl --enable-nonportable-atomics=yes
-with-mpm-prefork --enable-ssl --enable-rewrite --enable-
module=security --with-included-apr

Thanks

Jerry Stuckle

unread,
Apr 4, 2011, 6:27:11 AM4/4/11
to

Do you have OpenSSL installed (which version?) and are the .so's
available to PHP? This problem is almost always caused by an old
version of OpenSSL being picked up or OpenSSL not being available to PHP.

The other cause is not using the PHP executable or php.ini file you
think you're using, but since you are getting the message that OpenSSL
is disabled, this is less likely.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

Bob

unread,
Apr 4, 2011, 8:14:18 PM4/4/11
to
On Apr 4, 3:27 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:

> Do you have OpenSSL installed (which version?) and are the .so's
> available to PHP?  This problem is almost always caused by an old
> version of OpenSSL being picked up or OpenSSL not being available to PHP.

Am I supposed to set LD_LIBRARY_PATH? Or some other variable?
I want to use --with-openssl=/usr/..some dir.. but I couldnt find
an appropriate one to use.

I have openssl installed (apparently):

openssl-0.9.8n-2.fc11.i686
openssl-devel-0.9.8n-2.fc11.i586

/usr/lib/openssl/engines: (though these dont look like what I want?
not sure)
-rwxr-xr-x. 1 root root 14548 Jun 2 2010 lib4758cca.so*
-rwxr-xr-x. 1 root root 14664 Jun 2 2010 libaep.so*
-rwxr-xr-x. 1 root root 10580 Jun 2 2010 libatalla.so*
-rwxr-xr-x. 1 root root 2864 Jun 2 2010 libcapi.so*
-rwxr-xr-x. 1 root root 18960 Jun 2 2010 libchil.so*
-rwxr-xr-x. 1 root root 16508 Jun 2 2010 libcswift.so*
-rwxr-xr-x. 1 root root 2860 Jun 2 2010 libgmp.so*
-rwxr-xr-x. 1 root root 8804 Jun 2 2010 libnuron.so*
-rwxr-xr-x. 1 root root 18808 Jun 2 2010 libsureware.so*
-rwxr-xr-x. 1 root root 14684 Jun 2 2010 libubsec.so*

>
> The other cause is not using the PHP executable or php.ini file you
> think you're using, but since you are getting the message that OpenSSL
> is disabled, this is less likely.
>

I noticed in my config.log that it doesnt say yes or no when
configuring openssl:

configure:21995: checking for OpenSSL support
configure:22039: checking for Kerberos support
configure:22725: checking for DSA_get_default_method in -lssl
configure:22744: gcc -o conftest -g -O2 -fvisibility=hidden
conftest.c -lssl -lrt -lm -ldl -lnsl -lxml2 -lz -lm 1>&5
configure:22786: checking for pkg-config
configure:22991: checking for OpenSSL version

Jerry Stuckle

unread,
Apr 4, 2011, 9:17:43 PM4/4/11
to

Unfortunately, I'm not that familiar with openssl on Linux - I use
Debian, and just installing the Debian OpenSSL and PHP5 packages enabled
it for me. I would suggest you check with the openssl people as to what
they need, especially if you installed it by hand.

I'm using OpenSSL 0.9.8o 01 Jun 2010, but yours should work also.

Also, config generally outputs a message only if something is not found,
so it is finding it at compile time. The question is why it isn't
finding it at runtime.

Which version of Linux are you using?

Bob

unread,
Apr 4, 2011, 10:41:42 PM4/4/11
to

> I'm using OpenSSL 0.9.8o 01 Jun 2010, but yours should work also.

Yes, I figured the openssl part wasn't an issue.

> Which version of Linux are you using?

I thought it was 12, its Fedora 11. It should just work, I agree.
As long as config didn't complain that it couldnt find anything.
Weird.
Probably some obscure thing that's not being reported during config.

I found the libs, they are in /usr/lib/
lrwxrwxrwx. 1 root root 16 Jun 26 2010 libssl.so -> libssl.so.
0.9.8n*
-rwxr-xr-x. 1 root root 321572 Jun 2 2010 libssl.so.0.9.8n*
lrwxrwxrwx. 1 root root 16 Jun 26 2010 libssl.so.8 -> libssl.so.
0.9.8n*

I appreciate your time Jerry, thanks for trying.
Ill have to spend time on this to figure it out. If I find the
solution
Ill post back.

Anyone else have any suggestions?
Thanks

Mr. B-o-B

unread,
Apr 4, 2011, 11:57:45 PM4/4/11
to
Bob cried from the depths of the abyss...

>
>> I'm using OpenSSL 0.9.8o 01 Jun 2010, but yours should work also.
>

> Anyone else have any suggestions?
> Thanks
>

You might be experiencing the problem with your php configure option:

--with-openssl=/usr

I have to roll my own Slackware & CentOS PHP packages to include various
odbc libs/drivers, and I have had no problems using:

--with-openssl=shared

Once you are done installing, make sure openssl.so
is located in you /php/extensions location.

Also check your php.ini that extension=openssl.so in included (and not
commented out).

Hope this helps.

Mr. B-o-B

Bob

unread,
Apr 5, 2011, 12:41:08 AM4/5/11
to
On Apr 4, 8:57 pm, "Mr. B-o-B" <mr.chew.b...@gmail.com> wrote:
> Bob cried from the depths of the abyss...
>

lol. Ok this is dumb, but I dont know why it happened.
Turns out that php was installed in /usr/sbin/php, yet I had
no rpm php package installed. I dont know if I (at some time
in the past) tried to install php in a standard way and it put
it there or not, but that was my problem...I was calling the wrong
php binary rather than the one I thought I had installed!

Thanks for all the help. The suggestions were helpful as well for
my own future knowledge! Now onto the real work of php :)

Jerry Stuckle

unread,
Apr 5, 2011, 5:04:37 AM4/5/11
to

Which is for shared module support. He was trying to compile it into
the php executable. An entirely different thing.

Jerry Stuckle

unread,
Apr 5, 2011, 5:05:14 AM4/5/11
to

Glad you found it, Bob.

0 new messages