|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-16 11:38 UTC] dh at cross-solutions dot se
[2011-10-19 14:39 UTC] mike@php.net
[2011-10-19 14:39 UTC] mike@php.net
-Status: Open
+Status: Feedback
[2012-02-21 13:30 UTC] mike@php.net
-Status: Feedback
+Status: No Feedback
[2012-02-21 13:30 UTC] mike@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 12 22:00:02 2025 UTC |
Description: ------------ I create a HttpRequest object for an SSL site (paypal) with METH_POST method. Every hour or so I have to restart the apache server because all I get is "SSL request reached timeout" in my $message->send(). The length of the timeout does not matter (I've increased it to minutes with setOptions(), it just takes longer but it still times out). The funny thing is that while the request times out from PHP, I can make the exact same one with curl in a shell just fine, which suggests there is a problem with the php module. Reproduce code: --------------- $message = new HttpRequest( "https://svcs.sandbox.paypal.com/AdaptivePayments/Preapproval", HttpRequest::METH_POST ); $message->addHeaders( array( "X-PAYPAL-SECURITY-USERID" => "<replace_with_userid>", // I have removed our company's user ID here "X-PAYPAL-SECURITY-PASSWORD" => "<replace with password>", // And password "X-PAYPAL-SECURITY-SIGNATURE" => "<replace with signature>", // And signature "X-PAYPAL-REQUEST-DATA-FORMAT" => "NV", "X-PAYPAL-RESPONSE-DATA-FORMAT" => "NV", "X-PAYPAL-APPLICATION-ID" => "<replace with app ID>" ) ); $message->setPostFields( "bogus" ); try { $response = $message->send(); if ( $response->getResponseCode() == 200 ) { echo "Woohoo!"; } } catch ( HttpException $exception ) { echo "$exception\n"; } Expected result: ---------------- I get a response back from the server every time I make the request. Actual result: -------------- After a number of successful requests, I only get timeouts until I restart the apache server.