#18697 [Csd->Opn]: HTTPS POST crashing

From: Date: Mon, 09 Sep 2002 08:31:02 +0000
Subject: #18697 [Csd->Opn]: HTTPS POST crashing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18729@lists.php.net to get a copy of this message
ID: 18697 User updated by: glen@designsolution.co.uk -Summary: HTTP POST with libcurl can cause Segmentation fault Reported By: glen@designsolution.co.uk -Status: Closed +Status: Open Bug Type: cURL related Operating System: Linux -PHP Version: 4.2.2 +PHP Version: 4.2.3 New Comment: This is still happening with 4.2.3. However, it only seems to occur when posting to HTTPS URL's. I am using libcurl 7.9.8 (SSL 0.9.3) Previous Comments: ------------------------------------------------------------------------ [2002-08-02 19:05:15] sniper@php.net This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. ..and update your CURL.. ------------------------------------------------------------------------ [2002-08-02 03:21:58] glen@designsolution.co.uk I'm afraid this bug may be quite tricky to track down, but here goes: This script: $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, 'http://www.foo.com/test.php' ); curl_setopt( $ch, CURLOPT_FAILONERROR, 1 ); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch, CURLOPT_TIMEOUT, 3 ); // times out after 4s curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt( $ch, CURLOPT_POST, 1 ); curl_setopt( $ch, CURLOPT_POSTFIELDS, 'postvar1=php&postvar2=is&postvar3=great' ); $result = curl_exec( $ch ); curl_close( $ch ); echo "result = '$result'"; will work 9 out of 10 times with no problem at all. However, occasionally it will crash Apache. The line in the error log says 'child pid 2154 exit signal Segmentation fault (11)' and the browser will report 'The document contains no data'. I will attempt to get a backtrace if this will help. Here is my configure line: './configure' '--with-apxs=/usr/sbin/apxs' '--with-mysql=/usr/' '--with-gd=/usr/local' '--with-png-dir=/usr/local' '--with-zlib-dir=/usr' '--with-jpeg-dir=/usr/local' '--with-crack=../cracklib-2.7' '--with-curl=/usr/local' '--with-mcrypt=/usr/local' '--with-pspell=/usr/local' My phpinfo reports curl support as: libcurl 7.9.6 (SSL 0.9.3) Thanks, Glen ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18697&edit=1

« previous php.bugs (#18729) next »