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.
The code is kind of a mess. A lot of things have been tried and commented out. I've tried it using cURLpp and using the standard cURL libraries. Same results.
---------- Post updated at 09:10 PM ---------- Previous update was at 09:09 PM ----------
kverisignhost is the paypal payflow link. I've also tried google.com. Doesn't matter what the url is, if I set that option the program dies with no error and no explanation whatsoever.
---------- Post updated 08-17-09 at 10:31 AM ---------- Previous update was 08-16-09 at 09:10 PM ----------
I dumped the ldd info for both testing.cgi and example06. And here's what I got. Definitely something up with the libraries, but I don't know how to fix them.
I've been dumping log info and it's curl perform() that is causing it to die. Presumably from a linking error. Other than that I'm stuck in command line red hat and don't know how to apply a debugger. I'm kind of out of my element here.
I've run the application with strace, and don't see any point where it's failing. But then again, it's a large file and I'm not really sure what I'm looking for.
ok so for the project i had to log in amazon node to submitted and create a captcha using cgi scripts its for a unix project this is my amazon node address ss. but first i have to create a .ht access to set the master password. can someone please help me???
in public_html, create a file... (1 Reply)
Hi Team,
I am trying to connect to database(succeeded ) and print the records on the browser using while loop. But the elements of array are not displayed instead while loop is displayed directly. Instead of the below I can embed html statements in print but I am looking for the below style as I... (1 Reply)
Hi All,
I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet.
I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet.
print "<center><table... (2 Replies)
Hi team,
I have a typical problem with cgi pages in apache webserver in WINDOWS
I am able to execute(display) the pages that are saved in cgi-bin folder.
But I am not able to execute the pages stored in htdocs or other folder other than cgi-bin folder.
Could anyone please let me know how... (1 Reply)
Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect.
Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is
redirected to welcome page.
My... (3 Replies)
Hi,
I am running a bash shell script for some simple web server CGI, the script runs as expected from the browser except the following:
curl --silent --max-time 10 --output /dev/null --write-out %{http_code} http://server:port/filename
This line outputs 404 when i execute the script... (0 Replies)
Hello all, i`m new here and new in programming with cgi. But i need it for my running project. I`ve googled half a week with no success.
All i need is to run an .sh-file via cgi.
My file is stored in /home/bots/
but if i try
#!/bin/sh
echo 'Content-type: text/html'
echo
echo... (5 Replies)
Hi All,
Sorry if the question is trivial for you but, I am new to Apache (2.0.63) and am trying to figure out how to display my 400.cgi. Here is what I have in httpd.conf
servername testing
DocumentRoot "/usr/local/apache2/htdocs"
ErrorDocument 400 /cgi-bin/badrequest-400.cgi
Here is... (0 Replies)
If I have a Perl CGI script (script01), which fills an array(s) with information and outputs a HTML page with a link to another CGI page (script02); is there anyway to pass the array(s) from "script01" to "script02" when the page visitor clicks the link?
Hope that makes sense!
:) (2 Replies)
I am having trouble running my perl cgi on the Internet.
After i put the cgi file into the public_html directory and try to browse it on the internet, it returns me the exact content of the cgi file.
Is the file permission 755 for the cgi file correct?
My path to perl is something like ... (2 Replies)