From owner-freebsd-questions@FreeBSD.ORG Wed Jul 11 15:19:14 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B58A1106564A for ; Wed, 11 Jul 2012 15:19:14 +0000 (UTC) (envelope-from toomas.aas@raad.tartu.ee) Received: from kuller.raad.tartu.ee (kuller.raad.tartu.ee [213.184.43.8]) by mx1.freebsd.org (Postfix) with ESMTP id 5C95D8FC15 for ; Wed, 11 Jul 2012 15:19:14 +0000 (UTC) Received: from kuller.raad.tartu.ee (localhost [127.0.0.1]) by kuller.raad.tartu.ee (Postfix) with ESMTP id 63E4339832 for ; Wed, 11 Jul 2012 18:19:07 +0300 (EEST) X-Virus-Scanned: amavisd-new at post.raad.tartu.ee Received: from kuller.raad.tartu.ee ([127.0.0.1]) by kuller.raad.tartu.ee (kuller.raad.tartu.ee [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QyuVOrA5YsYL for ; Wed, 11 Jul 2012 18:19:06 +0300 (EEST) Received: by kuller.raad.tartu.ee (Postfix, from userid 80) id CE44139850; Wed, 11 Jul 2012 18:19:05 +0300 (EEST) Received: from 76.20.190.90.dyn.estpak.ee (76.20.190.90.dyn.estpak.ee [90.190.20.76]) by webmail.raad.tartu.ee (Horde Framework) with HTTP; Wed, 11 Jul 2012 18:19:05 +0300 Message-ID: <20120711181905.38805t0j3nik358o@webmail.raad.tartu.ee> Date: Wed, 11 Jul 2012 18:19:05 +0300 From: Toomas Aas To: freebsd-questions@freebsd.org References: <20120710160539.102922863js2qjs3@webmail.raad.tartu.ee> In-Reply-To: <20120710160539.102922863js2qjs3@webmail.raad.tartu.ee> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.7) X-Originating-IP: 90.190.20.76 Subject: Re: curl error: SSL_write() returned SYSCALL, errno = 32 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 15:19:14 -0000 Hello again! > Recently I upgraded a lot of ports on one of our FreeBSD 7.4 > servers. Among others I upgraded curl from 7.19.6 to 7.24.0, and php > from 5.2.11 to 5.3.13. PHP's curl extension is also installed. > > After the upgrade, an application which tries to POST some data over > https using PHP's curl_exec() function, is having trouble. > curl_error() returns the following after the POST request: > > SSL_write() returned SYSCALL, errno = 32 Some modifications in PHP code made everything happy again. 1. Removed the Expect: 100-continue HTTP header from requests sent by curl, by adding empty Expect: header curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect: ')); 2. Made sure CURLOPT_POSTFIELDS is an url-encoded query string instead of being a plain PHP array: curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($myarray)); -- Toomas Aas