|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62656 Undefined reference to SSLv2 variables with OpenSSL 1.0.1
Submitted: 2012-07-25 03:37 UTC Modified: 2017-07-30 18:05 UTC
Avg. Score:4.6 ± 0.8
Reproduced:33 of 33 (100.0%)
Same Version:8 (24.2%)
Same OS:26 (78.8%)
From: mattj at emazestudios dot com Assigned: bukka (profile)
Status: Closed Package: OpenSSL related
PHP Version: 5.3.15 OS: Linux
Private report: No CVE-ID: None
 [2012-07-25 03:37 UTC] mattj at emazestudios dot com
When compiling either 5.3.15 or 5.4.5 (or even 5.3 latest snapshot) with OpenSSL 1.0.1c, get the following error:

ext/openssl/xp_ssl.o: In function `php_openssl_setup_crypto':
/root/php-5.4.5/ext/openssl/xp_ssl.c:363: undefined reference to `SSLv2_server_method'
/root/php-5.4.5/ext/openssl/xp_ssl.c:338: undefined reference to `SSLv2_client_method'
collect2: ld returned 1 exit status

Apparently this is due to the removal of SSLv2 in OpenSSL, and the extension doesn't seem to properly pick up which versions miss it.

Using --with-openssl=/usr, but also occurs with --with-openssl alone.

uname -m = x86_64
uname -r = 3.2.0-26-generic
uname -s = Linux
uname -v = #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012
Autoconf 2.65

I can provide any sort of debugging help needed, as I would very much like to get this issue sorted. Can provide a full config.log on request, same as any make output.

Seems very similar to bug #54507, however that's supposedly resolved quite a while ago.

Expected result:
Normal compilation with OpenSSL module

Actual result:
Compilation errors as shown above


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-28 13:48 UTC] dsysko at genscape dot com
I see this same behaviour with PHP version 5.4.6 and same version of OpenSSL(1.0.1c)

My config options:
 [2013-05-30 22:41 UTC] hessemanj2100 at gmail dot com
I have the same exact problem when compiling php-5.3.25 or php-5.4.15 on Ubuntu 
Server 12.04.02. I am using OpenSSL 1.0.1e

configure and make commands to compile OpenSSL:
./config --prefix=/usr/local/ssl --enable-shared

sudo make
sudo make install
sudo ln -s /usr/local/ssl/bin/openssl /usr/local/bin/openssl

configure and make commands to compile PHP
./configure \
--prefix=/usr/local/php \
--with-mcrypt \
--with-mhash \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-iodbc \
--with-zlib \
--with-openssl=/usr/local/ssl \
--with-curl=/usr/local/curl \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-wddx \
--enable-sqlite-utf8 \
--enable-zip \

sudo make
sudo make install

Please note that I successfully compiled OpenSSL as a shared object
with the following commands:

cd ext/openssl
mv config0.m4 config.m4
./configure --with-openssl=/usr/local/ssl
sudo make

The extension,, was found in the modules folder.
 [2013-05-31 21:24 UTC] hessemanj2100 at gmail dot com
This seems to be an Ubuntu problem because I successfully compiled PHP on CentOS 
6.4 x64_x86. Perhaps a comparison of the configure and make logs from Ubuntu and 
CentOS might narrow down the problem? I wish I could provide more info but that is 
all I have.
 [2014-02-28 05:38 UTC]
This is almost certainly due to distros disabling the highly broken/insecure SSLv2 protocol at compile time in their OpenSSL build. It should be a simple matter of adding ifdef checks to the relevant openssl extension code to fix the problem. I will look into this.
 [2014-02-28 05:39 UTC]
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: rdlowrey
 [2017-07-30 18:05 UTC]
-Status: Analyzed +Status: Closed -Assigned To: rdlowrey +Assigned To: bukka
 [2017-07-30 18:05 UTC]
This shouldn't be longer an issue as SSL2 support was also dropped from PHP 7.1 and all check should already work fine in 7.0. Older versions are no longer supported.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Oct 22 04:03:33 2021 UTC