php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34796 ftp module compiled with openssl extension enabled must be loaded after ssl lib
Submitted: 2005-10-09 22:01 UTC Modified: 2005-10-28 02:37 UTC
From: glen at delfi dot ee Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.1.0RC1 OS: PLD Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: glen at delfi dot ee
New email:
PHP Version: OS:

 

 [2005-10-09 22:01 UTC] glen at delfi dot ee
Description:
------------
if you configure your php with:  
--with-openssl=shared  
--enable-ftp=shared  
  
then ftp module is compiled with openssl related functions,  
but not linked, this causes ftp module loaded earlier in  
php.ini outputing missing SSL_ symbols  
  
$ php -m  
PHP Warning:  PHP Startup: Unable to load dynamic library  
'/usr/lib/php/ftp.so' - /usr/lib/php/ftp.so: undefined  
symbol: SSL_shutdown in Unknown on line 0  
 
here's patch to fix it. 
http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/php-ftp-ssllibs.patch 
 
NB: applying this patch and compiling --without-openssl is 
not tested. otherwise it fixes the bug described earlier. 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-09 22:40 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fix will be in PHP 5.1 and above.
 [2005-10-10 00:10 UTC] glen at delfi dot ee
i updated the patch so it will work also with:  
--disable-openssl --enable-ftp=shared  
  
my test compile and run worked ok.  
 
get the patch from same URL.
 [2005-10-10 07:50 UTC] sniper@php.net
Thanks but I already committed something similar as your
first patch was obviously half-way there.

 [2005-10-28 02:37 UTC] bfrance@php.net
Any problem with my committing this patch so that building via phpize works?  Seems like there should better or more standard way to do this, but I couldn't find any.

Index: config.m4
===================================================================
RCS file: /repository/php-src/ext/ftp/config.m4,v
retrieving revision 1.7.20.2
diff -u -p -r1.7.20.2 config.m4
--- config.m4   9 Oct 2005 20:44:02 -0000       1.7.20.2
+++ config.m4   28 Oct 2005 00:32:09 -0000
@@ -12,6 +12,9 @@ if test "$PHP_FTP" = "yes"; then
   AC_DEFINE(HAVE_FTP,1,[Whether you want FTP support])
   PHP_NEW_EXTENSION(ftp, php_ftp.c ftp.c, $ext_shared)
 
+  dnl Empty variable means 'no'
+  test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
+
   if test "$PHP_OPENSSL" != "no" || test "$PHP_OPENSSL_DIR" != "no"; then
     PHP_SETUP_OPENSSL(FTP_SHARED_LIBADD)
     PHP_SUBST(FTP_SHARED_LIBADD)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 14:01:29 2024 UTC