Forum Moderators: coopster

Message Too Old, No Replies

curl doesn't work on my dev server

         

jamie

12:53 pm on Apr 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi,

i am testing a payment gateway connection using curl.

it works fine on the live server, but it doesn't generate any response when i test it on my dev server. the dev server is an exact mirror setup of the live server, except that i have no fqdn - i have just set up the hosts file to alias a made up name to the local IP (192.168.x.x) of the site.

the curl functions are

$ch = curl_init($URL);  
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$resp = curl_exec($ch);
curl_close($ch);

$resp is completely empty?

(the same code works perfectly on the live server)

any suggestions?

many thanks

jatar_k

4:24 pm on Apr 26, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



the place to start is to watch logs, even tcpdump to see what is going where.

any firewall rules or anything else that might be different for the dev server? I am sure the server software etc is setup exactly the same but is there anything different about how tyhey communicate or get in and out?

jamie

7:50 pm on Apr 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi jatar_k

thanks for pointing in another direction.

tcpdump returned something in a format which i shall not attempt to decifer this evening ;)

and i couldn't find anywhere to turn curl logging on - any hints?

cheers

jatar_k

8:52 pm on Apr 26, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



not so much curl logging but any systems errors that may be occuring anywhere

firewall logs to look for blocked requests
errors in some internal service, maybe curl is dying siently, nothing more aggravating than a service dying with out letting out a scream first ;)

I also printed this last week while working on a curl script
[ca.php.net...]

gives a nice comprehensive list of options to use.

CURLOPT_VERBOSE could help.