|
cURL and cgi
I have a CGI application done in c++ that communicates with PayPal. I've had an issue where the application dies when I try to perform a cURL operation. Upon further inspection it seems that I can run cURL examples from the command line.
Upon even further inspection it seems that I can run cURL in the CGI if I don't set the URL option. Any other option seems to be ok. Of course this fails with an error from cURL saying that the URL was not set. But at least I get to the point of an error.
If I set the URL option it either displays a blank white screen at perform, assuming I print the necessary headers, or it fails with premature end of script headers.
So I'm not a unix guru, and I'm kind of in over my head here, but it is what it is. I'm thinking maybe there's a port blocked that's used by the cgi for outgoing requests that isn't used for the command line. I'm thinking maybe it's a permissions thing. The examples were run as root, and I set the .cgi file to be owned by root, but maybe that doesn't count.
I could really use some direction here. And keep in mind my unix knowledge is not phenominal. I can get around alright, but I need a little help.
I'm running red hat and apache.
Thanks,
Brandon
|