php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12216 4.0.6 + curl 7.8 Do not properly support https
Submitted: 2001-07-17 16:33 UTC Modified: 2001-07-30 18:23 UTC
From: dave at pmmci dot com Assigned:
Status: Closed Package: cURL related
PHP Version: 4.0.6 OS: FreeBSD 4.3
Private report: No CVE-ID: None
 [2001-07-17 16:33 UTC] dave at pmmci dot com

Compiled php4.0.6 with curl 7.8 and open ssl. using this small script, the data properly returns:

[(root)dave@sentinel goto]# cat test.php 
#!/usr/bin/php -q
<?
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL,"http://www.thedatasource.net/"); 
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_VERBOSE, 1);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_exec ($ch);
curl_close ($ch);
?>
[(root)dave@sentinel goto]# ./test.php 
* Connected to www.thedatasource.net (207.91.108.69)
> GET / HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Host: www.thedatasource.net
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

* Connection (#0) left alive
* Closing live connection (#0)
[(root)dave@sentinel goto]# 

I switch to https:


[(root)dave@sentinel goto]# ./test.php   
* Closing live connection (#0)
[(root)dave@sentinel goto]# 

I put phpinfo() in another small function to verify curl:

[(root)dave@sentinel goto]# ./test2.php | grep curl
<H2 align="center"><A NAME="module_curl">curl</A></H2>
<TR VALIGN="baseline" BGCOLOR="#CCCCCC"><TD BGCOLOR="#CCCCFF" ><B>CURL Information</B></td><TD ALIGN="left">libcurl 7.8 (SSL 0.9.5)</td></TR>
[(root)dave@sentinel goto]#

Commandline, i test curls use of SSL:

[(root)dave@sentinel goto]# curl https://www.thedatasource.net | more
  % Total    % Received % Xferd  Average Speed          Time             Curr.
                                 Dload  Upload Total    Current  Left    Speed
100 10202    0 10202    0     0  30786      0 --:--:--  0:00:00 --:--:--  6484
<html>

works fine.

If i downgrade to: 
curl 7.7.3 (i386--freebsd4.3) libcurl 7.7.3 (OpenSSL 0.9.6) (ipv6 enabled)
and php4.0.5 everything works as advertised.

php 4.0.6 requires curl 7.8 to compile, i cant test with downgraded curl only.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-30 18:23 UTC] sterling@php.net
It works fine for me with the latest CVS. can you upgrade 
and re-open if the bug still exists (also, when you use 
CURLOPT_RETURNTRANSFER, expect curl_exec() to return the 
data not output it.)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC