Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #38180 : curl_errno:35, Unknown SSL protocol
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 13th June 19:05
php-bugs
External User
 
Posts: 1
Default #38180 : curl_errno:35, Unknown SSL protocol



From: martin dot wirth dot job1 at miradigm dot com
Operating system: 2.4.20-021stab028.17.777-enterpr
PHP version: 5.1.4
PHP Bug Type: cURL related
Bug description: curl_errno:35, Unknown SSL protocol

Description:
------------
Upgrading from PHP 4.2 to PHP 5.1.4 broke the cURL connection.


Reproduce code:
---------------
The following code worked with PHP 4.2 but now produces no response:

$ch = curl_init($gateway);
curl_setopt($ch, CURLOPT_VERBOSE,TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info
from response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data
instead of TRUE(1)
curl_setopt($ch, CURLOPT_POSTFIELDS,$postdata);
$res = curl_exec($ch);
curl_close ($ch);

After upgrading to PHP 5.1.4 only the command line works:

$res = exec("/usr/bin/curl -iL -d '$postdata' --url '$gateway'");

The gateway is a secure web site connected with my secure web site where
both URLs begin with "https://".

Although my workaround solves the problem. There is now a bug between cURL
and PHP5.


Expected result:
----------------
Top example returns nothing but should return a response into array $res.

Bottom example returns that same as prior to PHP5 upgrade. It is a patch
that demonstrate that the cURL lib may be working correctly while the new
version of PHP may have an interfacing issue with it.


Actual result:
--------------
curl_errno() returns error 35 "Unknown SSL protocol..." after curl_exec().

--
Edit bug report at http://bugs.php.net/?id=38180&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38180&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38180&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38180&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38180&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38180&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38180&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38180&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38180&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38180&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38180&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38180&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38180&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38180&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38180&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38180&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38180&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38180&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38180&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38180&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38180&r=mysqlcfg
  Reply With Quote


  sponsored links


2 13th June 19:05
External User
 
Posts: 1
Default #38180 : curl_errno:35, Unknown SSL protocol



ID: 38180
Updated by: mike@php.net
Reported By: martin dot wirth dot job1 at miradigm dot com
-Status: Open
+Status: Bogus
Bug Type: cURL related
Operating System: 2.4.20-021stab028.17.777-enterpr
PHP Version: 5.1.4
New Comment:

Make sure the https server is really SSL enabled.


Previous Comments:
------------------------------------------------------------------------

[2006-07-21 18:15:56] martin dot wirth dot job1 at miradigm dot com

Description:
------------
Upgrading from PHP 4.2 to PHP 5.1.4 broke the cURL connection.


Reproduce code:
---------------
The following code worked with PHP 4.2 but now produces no response:

$ch = curl_init($gateway);
curl_setopt($ch, CURLOPT_VERBOSE,TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header
info from response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data
instead of TRUE(1)
curl_setopt($ch, CURLOPT_POSTFIELDS,$postdata);
$res = curl_exec($ch);
curl_close ($ch);

After upgrading to PHP 5.1.4 only the command line works:

$res = exec("/usr/bin/curl -iL -d '$postdata' --url '$gateway'");

The gateway is a secure web site connected with my secure web site
where both URLs begin with "https://".

Although my workaround solves the problem. There is now a bug between
cURL and PHP5.


Expected result:
----------------
Top example returns nothing but should return a response into array
$res.

Bottom example returns that same as prior to PHP5 upgrade. It is a
patch that demonstrate that the cURL lib may be working correctly while
the new version of PHP may have an interfacing issue with it.


Actual result:
--------------
curl_errno() returns error 35 "Unknown SSL protocol..." after
curl_exec().


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=38180&edit=1
  Reply With Quote
3 13th June 22:50
php-bugs
External User
 
Posts: 1
Default #38180 : curl_errno:35, Unknown SSL protocol


ID: 38180
User updated by: martin dot wirth dot job1 at miradigm dot com
Reported By: martin dot wirth dot job1 at miradigm dot com
Status: Bogus
Bug Type: cURL related
Operating System: 2.4.20-021stab028.17.777-enterpr
PHP Version: 5.1.4
New Comment:

My web host recompiled Apache --with-openssl and curl_error($ch) still
returns:

Unknown SSL protocol error in connection to [secure site]:443

The certs are OK. The secure domain presents correctly. So, Apache
seems to know where the CA information is.

In case Apache was passing wrong information to PHP and cURL, I also
tried setting CURLOPT_SSL_VERIFYPEER true and CURLOPT_CAPATH ********ly
to the following:
[absolute path]/ssl
[absolute path]/ssl/certs
[absolute path]/ssl/CA

These tests produced the same disappointing result.

The exec(...) workaround still succeeds.


Previous Comments:
------------------------------------------------------------------------

[2006-07-21 18:39:30] mike@php.net

Make sure the https server is really SSL enabled.

------------------------------------------------------------------------

[2006-07-21 18:15:56] martin dot wirth dot job1 at miradigm dot com

Description:
------------
Upgrading from PHP 4.2 to PHP 5.1.4 broke the cURL connection.


Reproduce code:
---------------
The following code worked with PHP 4.2 but now produces no response:

$ch = curl_init($gateway);
curl_setopt($ch, CURLOPT_VERBOSE,TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header
info from response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data
instead of TRUE(1)
curl_setopt($ch, CURLOPT_POSTFIELDS,$postdata);
$res = curl_exec($ch);
curl_close ($ch);

After upgrading to PHP 5.1.4 only the command line works:

$res = exec("/usr/bin/curl -iL -d '$postdata' --url '$gateway'");

The gateway is a secure web site connected with my secure web site
where both URLs begin with "https://".

Although my workaround solves the problem. There is now a bug between
cURL and PHP5.


Expected result:
----------------
Top example returns nothing but should return a response into array
$res.

Bottom example returns that same as prior to PHP5 upgrade. It is a
patch that demonstrate that the cURL lib may be working correctly while
the new version of PHP may have an interfacing issue with it.


Actual result:
--------------
curl_errno() returns error 35 "Unknown SSL protocol..." after
curl_exec().


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=38180&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666