php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17715 cURL can't make SSL connections in CGI
Submitted: 2002-06-11 17:42 UTC Modified: 2002-06-11 19:46 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mwalker at kydance dot net Assigned:
Status: Closed Package: cURL related
PHP Version: 4.1.2 OS: Linux 2.4.17 SMP
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: mwalker at kydance dot net
New email:
PHP Version: OS:

 

 [2002-06-11 17:42 UTC] mwalker at kydance dot 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'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-11 17:43 UTC] mwalker at kydance dot net
Note that curl works properly in the apache module version of PHP on the same box.
 [2002-06-11 18:16 UTC] 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 18:23 UTC] mwalker at kydance dot 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:25 UTC] mwalker at kydance dot 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:30 UTC] edink@php.net
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?
 [2002-06-11 18:35 UTC] mwalker at kydance dot net
Example Run:

[root@helium /root]# php -q /var/www/mthmarketing/test.php
bool(false)
 [2002-06-11 19:40 UTC] mwalker at kydance dot net
Well, I went ahead and upgraded our CGI version to 4.2.1, and it's working now, so the problem is definately in 4.1.2.
 [2002-06-11 19:46 UTC] sniper@php.net
Nice to hear. I remember some bug related to this one been
fixed there.. closing then.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 08 00:01:29 2025 UTC