php.net |  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
Votes:35
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mattj at emazestudios dot com
New email:
PHP Version: OS:

 

 [2012-07-25 03:37 UTC] mattj at emazestudios dot com
Description:
------------
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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:
--with-openssl 
--with-pgsql 
--with-curl 
--with-tidy 
--with-zlib 
--with-apxs2=/usr/local/httpd/bin/apxs 
--with-gd 
--with-pdo-pgsql 
--enable-pdo 
--enable-zip 
--enable-pcntl 
--enable-soap
 [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 \
--enable-cgi

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
phpize
./configure --with-openssl=/usr/local/ssl
sudo make

The extension, openssl.so, 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] rdlowrey@php.net
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] rdlowrey@php.net
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: rdlowrey
 [2017-07-30 18:05 UTC] bukka@php.net
-Status: Analyzed +Status: Closed -Assigned To: rdlowrey +Assigned To: bukka
 [2017-07-30 18:05 UTC] bukka@php.net
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: Thu Mar 04 13:01:25 2021 UTC