I am running a script on Amazon EC2 and trying to make a cURL request to CloudFront, which requires SSL.
It times out: Operation timed out after 25000 milliseconds with 107 out of 552 bytes received
The request does ‘work’ in that the distribution is updated etc, but the response isn’t fully formed so I can’t use the response data.
I have the following TCP ports open in my security group:
- 20
- 80
- 442
- 10000
Any ideas why this would be happening? The script itself works perfectly on other servers. openssl is enabled and ssl is too.
I am already using:
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
Whilst this isn’t the greatest answer, this is how I fixed it.
I ported my code – which was from the library found here: http://undesigned.org.za/2007/10/22/amazon-s3-php-class – to the official AWS SDK. This required quite a few changes, but, it got the result.