Bug #17715 Updated: cURL can't make SSL connections in CGI
| From: | edink@php.net | Date: | Tue, 11 Jun 2002 22:30:45 +0000 |
| Subject: | Bug #17715 Updated: cURL can't make SSL connections in CGI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10175@lists.php.net to get a copy of this message | ||
ID: 17715
Updated by: edink@php.net
Reported By: mwalker@kydance.net
Status: Feedback
Bug Type: cURL related
Operating System: Linux 2.4.17 SMP
PHP Version: 4.1.2
New Comment:
I just tested your script with PHP 4.2.1 on RedHat Linux 6.2 and curl
7.9.5 (i686-pc-linux-gnu) libcurl 7.9.5 (OpenSSL 0.9.5). It worked as
expected.
What output/error messages you get?
Previous Comments:
------------------------------------------------------------------------
[2002-06-11 18:25:27] mwalker@kydance.net
Bug in that script I just posted. Corrected version:
<?
$curlsession = curl_init("https://www.mthmarketing.com/index.html");
curl_setopt($curlsession, CURLOPT_RETURNTRANSFER, 1);
$return_string = curl_exec($curlsession);
curl_close($curlsession);
var_dump($return_string);
?>
------------------------------------------------------------------------
[2002-06-11 18:23:34] mwalker@kydance.net
No, we haven't upgraded to 4.2x yet.
Here's the script for you:
<?
$curlsession = curl_init("https://www.mthmarketing.com/index.html");
curl_setopt($curlsession, CURLOPT_RETURNTRANSFER, 1);
$return_string = curl_exec($curlsession);
curl_close($curlsession);
var_dump($curlsession);
?>
------------------------------------------------------------------------
[2002-06-11 18:16:48] sniper@php.net
Have you tried PHP 4.2.1 ? Also, add a short, self-contained
script here which can be used to reproduce this problem.
------------------------------------------------------------------------
[2002-06-11 17:43:28] mwalker@kydance.net
Note that curl works properly in the apache module version of PHP on
the same box.
------------------------------------------------------------------------
[2002-06-11 17:42:38] mwalker@kydance.net
When PHP is compiled as CGI (non-apache module), and you attempt to
make an SSL connection over cURL, it returns null. If you connect to a
non-SSL address, it works.
My cURL version:
libcurl 7.9.5 (OpenSSL 0.9.6)
My configure line:
'./configure' 'i386-redhat-linux' '--prefix=/usr'
'--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr'
'--with-config-file-path=/etc' '--disable-debug' '--enable-pic'
'--disable-rpath' '--enable-inline-optimization'
'--with-apxs=/usr/sbin/apxs' '--with-bz2' '--with-db3'
'--with-exec-dir=/usr/bin' '--with-gd' '--with-gdbm'
'--with-gettext'
'--with-jpeg-dir=/usr' '--with-openssl' '--with-png'
'--with-regex=system' '--with-ttf' '--with-zlib'
'--with-layout=GNU'
'--enable-bcmath' '--enable-debugger' '--enable-ftp'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars'
'--enable-yp' '--enable-wddx' '--with-mysql'
'--without-unixODBC'
'--without-oracle' '--without-oci8' '--with-pspell'
'--with-xml'
'--with-curl' '--enable-trans-id'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17715&edit=1