I've been struggling to figure out why my page which uses curl
library in PHP worked on my dev machine but failed on my remote server. One suspicion is that it's related to whether the curl
has an SSL support, as indicated in one of the comments here:
If your curl installation is not compiled with SSL support you will beat your head against a wall when trying to figure out why curl_exec() is failing to fail or do anything else ...
So, I ran this script to find out whether SSL is supported on both my dev machine and remote server. Both my dev machine and remote server produced the following (looks like both support SSL):
CURL_VERSION_IPV6 matches CURL_VERSION_KERBEROS4 does not match CURL_VERSION_SSL matches CURL_VERSION_LIBZ matches
However, when I ran curl
from the command line on my remote server (the one where my script failed), here's what I got (i.e. curl
hang):
curl -v http://<my-domain>/blog/press-release/
* About to connect() to <my-domain> port 80
* Trying 66.201.45.235...
The same curl
command line worked fine on my dev machine although it returned a different IP address:
curl -v http://<my-domain>/blog/press-release/
* About to connect() to <my-domain> port 80 (#0)
* Trying 10.3.1.207... connected
Please... please help? Any other way to figure out the differences between the installed curl
on my dev machine and remote server? Why did they return different addresses?