Edit report at http://bugs.php.net/bug.php?id=33770&edit=1
ID: 33770
Comment by: galaxy4public+php at gmail dot com
Reported by: subscription at nazarenko dot net
Summary: https:// or ftps:// do not work when
--with-curlwrappers is used
Status: Closed
Type: Bug
Package: cURL related
Operating System: Linux OpenSUSE 10.1
PHP Version: 5CVS-2006-06-26 (snap)
Assigned To: iliaa
Block user comment: N
Private report: N
New Comment:
The bug is still here. I've reproduced it with PHP 5.2.17 which was built with
the following options:
System => Linux he251.vps.webenabled.net 2.6.18-238.5.1.el5.028stab085.2.owl2
#1
SMP Sat Mar 12 19:50:32 MSK 2011 i686
Build Date => Apr 25 2011 08:06:28
Configure Command => './configure' '--host=i686-openwall-linux-gnu'
'--build=i686-openwall-linux-gnu'
'--target=i686-openwall-linux'
'--program-prefix='
'--prefix=/opt/php/5.2.17-owlx0'
'--exec-prefix=/opt/php/5.2.17-owlx0'
'--bindir=/opt/php/5.2.17-owlx0/bin'
'--sbindir=/opt/php/5.2.17-owlx0/sbin'
'--sysconfdir=/opt/php/5.2.17-owlx0/etc'
'--datadir=/opt/php/5.2.17-owlx0/share'
'--includedir=/opt/php/5.2.17-owlx0/include'
'--libdir=/opt/php/5.2.17-owlx0/lib'
'--libexecdir=/opt/php/5.2.17-owlx0/libexec'
'--localstatedir=/opt/php/5.2.17-owlx0/var'
'--sharedstatedir=/opt/php/5.2.17-owlx0/com'
'--mandir=/opt/php/5.2.17-owlx0/man'
'--infodir=/opt/php/5.2.17-owlx0/info'
'--with-layout=GNU'
'--with-config-file-path=/opt/php/5.2.17-owlx0/etc'
'--with-config-file-scan-dir=/opt/php/5.2.17-owlx0/etc/php.d'
'--disable-rpath'
'--with-libdir=lib'
'--disable-debug'
'--enable-shared'
'--enable-static'
'--disable-all'
'--enable-short-tags'
'--enable-cgi'
'--disable-force-cgi-redirect'
'--enable-fastcgi'
'--enable-cli'
'--with-pear=/opt/php/pear'
'--enable-discard-path'
'--enable-magic-quotes'
'--enable-calendar=shared'
'--enable-ctype=shared'
'--enable-date'
'--enable-dba=shared'
'--with-gdbm'
'--with-db4'
'--with-cdb'
'--with-inifile'
'--with-flatfile'
'--enable-dbase=shared'
'--enable-dom=shared'
'--enable-exif=shared'
'--enable-filter=shared'
'--enable-ftp=shared'
'--enable-hash=shared'
'--enable-json=shared'
'--enable-mbstring=shared'
'--enable-mbregex'
'--enable-pcntl=shared'
'--enable-pdo=shared'
'--with-pdo-mysql=shared,/opt/mysql/current'
'--with-pdo-pgsql=shared,/opt/postgresql/current'
'--with-pdo-sqlite=shared,/opt/sqlite/current'
'--with-pgsql=shared,/opt/postgresql/current'
'--enable-posix=shared'
'--enable-session=shared'
'--enable-shmop=shared'
'--enable-soap=shared'
'--enable-sockets=shared'
'--enable-spl'
'--enable-simplexml'
'--enable-suhosin=shared'
'--enable-sysvmsg=shared'
'--enable-sysvsem=shared'
'--enable-sysvshm=shared'
'--enable-tokenizer=shared'
'--enable-wddx=shared'
'--enable-xml=shared,/opt/libxml2/current'
'--enable-xmlreader=shared'
'--enable-xmlwriter=shared'
'--enable-libxml=yes,shared'
'--with-libxml-dir=/opt/libxml2/current'
'--enable-memory-limit'
'--enable-zend-multibyte'
'--with-xsl=shared,/opt/libxslt/current'
'--with-openssl=shared'
'--with-zlib=shared'
'--enable-zip=shared'
'--with-bz2=shared'
'--with-curl=shared,/opt/curl/current'
'--with-curlwrappers'
'--with-gd=shared'
'--with-jpeg-dir=/opt/libjpeg/current'
'--with-png-dir=/opt/libpng/current'
'--enable-gd-native-ttf'
'--enable-gd-jis-conv'
'--with-freetype-dir=/opt/libfreetype/current'
'--with-gettext=shared'
'--with-mssql=shared,/opt/freetds/current'
'--with-mysql=shared,/opt/mysql/current'
'--with-mysqli=shared,/opt/mysql/current/bin/mysql_config'
'--with-iconv=shared'
'--with-imap=shared,/opt/libc-client/current'
'--with-imap-ssl'
'--with-mcrypt=shared,/opt/libmcrypt/current'
'--with-mhash=shared,/opt/libmhash/current'
'--with-mime-magic=shared,/opt/httpd/config/magic'
'--with-ncurses=shared'
'--with-readline=shared'
'--with-pcre-regex'
'--disable-ipv6'
if the curl.so extension is not loaded get_file_contents() works with https,
if curl.so is loaded the function returns an empty string.
Previous Comments:
------------------------------------------------------------------------
[2006-08-30 17:49:36] [email protected]
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.
------------------------------------------------------------------------
[2006-08-24 15:28:03] [email protected]
Disabling CURLOPT_SSL_VERIFYPEER & CURLOPT_SSL_VERIFYHOST with the patch below
fixes it.
I believe installing a CA certificate would fix it too.
Index: ext/curl/streams.c
===================================================================
RCS file: /repository/php-src/ext/curl/streams.c,v
retrieving revision 1.14.2.2.2.5
diff -u -p -d -r1.14.2.2.2.5 streams.c
--- ext/curl/streams.c 10 Aug 2006 15:02:41 -0000 1.14.2.2.2.5
+++ ext/curl/streams.c 24 Aug 2006 15:26:40 -0000
@@ -291,6 +291,8 @@ php_stream *php_curl_stream_opener(php_s
curl_easy_setopt(curlstream->curl, CURLOPT_ERRORBUFFER,
curlstream->errstr);
curl_easy_setopt(curlstream->curl, CURLOPT_VERBOSE, 0);
+ curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0);
/* enable progress notification */
curl_easy_setopt(curlstream->curl, CURLOPT_PROGRESSFUNCTION,
on_progress_avail);
------------------------------------------------------------------------
[2006-04-10 12:00:22] [email protected]
See also bug #36882
------------------------------------------------------------------------
[2006-01-13 18:32:20] subscription at nazarenko dot net
Tried the 200601131530 snapshot.
OpenSSL libs: 0.9.7g
Curl libs: 7.14.0
Same result.
HTTPS works only when --with-curlwrappers is not used.
------------------------------------------------------------------------
[2005-11-10 00:15:48] subscription at nazarenko dot net
Here is the result after compiling with --with-curlwrappers:
/install/php5-200511091730/sapi/cli/php -i | grep Registered
Registered PHP Streams => php, file, ftp, gopher, telnet, dict, ldap, http,
https, ftps
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2,
tls
Registered Stream Filters => string.rot13, string.toupper, string.tolower,
string.strip_tags, convert.*
/install/php5-200511091730/sapi/cli/php -i | grep fopen
allow_url_fopen => On => On
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=33770
--
Edit this bug report at http://bugs.php.net/bug.php?id=33770&edit=1