PHP - curl_exec hangs PHP - curl_exec hangs curl curl

PHP - curl_exec hangs


add the following at the end your script to get the cause of failure

if( $rawresponse === false )    syslog( LOG_INFO , "base.php::requestPost() : ".curl_error($curlSession) );

EDIT 1

It could be an internal problem of curl. Before all check all server runtimes are up to date ( php, php-curl and apache at least). Check all their logs.....Then I would recommand comparing results between several production environment or a dev/test environment.

Finally try to narrow down a minimal testcase that could reproduce your issue and publish full code for the test case.


The stack trace clearly shows that the break you did occur within the NSS crypto library that your libcurl is built to use for SSL.

libcurl has got a lot of NSS-related fixes since the libcurl version you use, and possibly you're not using the most up-to-date NSS either. I would strongly suggest that you consider upgrading to the latest and greatest before you pull all your hair out on this problem.

To debug this problem, I would recommend you try to repeat it with the curl command line from the same server, and make good use of the --trace-ascii command.


The problem was NSS. I recompiled curl with OpenSSL and so far it has not shown any issues.

Cheers!