|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-21 18:39 UTC] mike@php.net
[2006-07-22 13:05 UTC] martin dot wirth dot job1 at miradigm dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 21:00:02 2025 UTC |
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().