POST not working on CGI executable

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
foobar
-


Joined: 29 Jun 2004
Posts: 2

PostPosted: Tue Jun 29, 2004 12:48 pm    Post subject: POST not working on CGI executable Reply with quote

I have a CGI executable, account.exe, enabled under Abyss, and it partially works. Calling up the program with say http://127.0.0.1/account.exe I get a Web form as I'm supposed to, but when I try to submit the form, no POST actually takes place, it just seems to do a GET. Same account.exe works under IIS and Apache.

Have "Resolve interpreter using the Windows Registry=Yes" and added the account.exe under CGI Paths, and all that seems fine--the program executes as opposed to trigger a browser download.

What have I done wrong?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jun 29, 2004 4:07 pm    Post subject: Re: POST not working on CGI executable Reply with quote

foobar,

All depends on the HTML code in the form you're using. The best to do is to send us a zipped package to support@aprelium.com containing your abyss.conf file, your CGI executable and HTML forms that use it.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
foobar
-


Joined: 29 Jun 2004
Posts: 2

PostPosted: Tue Jun 29, 2004 7:21 pm    Post subject: Reply with quote

The HTML is alright, ie method="POST", so that's not it. The exact same executable works under IIS 5-6 and Apache 2.0.43. I'll zip things up and send you an email.
Back to top View user's profile Send private message
n1ist
-


Joined: 05 Aug 2004
Posts: 4

PostPosted: Sat Aug 07, 2004 1:35 am    Post subject: Reply with quote

I am seeing the same thing here. The form definitely has method="POST",
yet adding a system("set"); in my cgi executable shows
REQUEST_METHOD=GET
CONTENT_LENGTH=0

Any ideas what to look for?
Thanks.
/mike
Back to top View user's profile Send private message
aprelium-beta
-


Joined: 24 Jun 2004
Posts: 383

PostPosted: Sat Aug 07, 2004 2:44 am    Post subject: Reply with quote

n1ist wrote:
I am seeing the same thing here. The form definitely has method="POST",
yet adding a system("set"); in my cgi executable shows
REQUEST_METHOD=GET
CONTENT_LENGTH=0

Any ideas what to look for?
Thanks.
/mike

Can you copy/paste here the <form ...> line from your HTML (or all your HTML source code if not too long) so that we can review it? FYI, Abyss doesn't change the request type. The request type is set by the browser, so this means that either your browser doesn't understand POST or that there a problem with your HTML form.
_________________
Beta Testing Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
n1ist
-


Joined: 05 Aug 2004
Posts: 4

PostPosted: Sun Aug 08, 2004 4:18 pm    Post subject: Reply with quote

Here's the html:

<html><head><title>survey</title></head>
<body>
<form action="http://www.ardai.org/cgi-bin/barcsurvey.exe" method="POST">
<input type="submit" value="Click Here to submit the survey">
</form>
</body></html>

And here's the result of the system("set") in barcsurvey.exe:

PROMPT=$P$G
SystemRoot=C:\WINNT
PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem
COMSPEC=C:\WINNT\system32\cmd.exe
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
WINDIR=C:\WINNT
TMP=C:\DOCUME~1\pc\LOCALS~1\Temp
TEMP=C:\DOCUME~1\pc\LOCALS~1\Temp
SERVER_SOFTWARE=Abyss/1.2.3.0-Win32 AbyssLib/1.1.0
SERVER_NAME=ardai.dyndns.org
SERVER_PROTOCOL=HTTP/1.1
SERVER_PORT=80
REMOTE_ADDR=192.168.1.1
REMOTE_PORT=17160
GATEWAY_INTERFACE=CGI/1.1
DOCUMENT_ROOT=C:\program files\abyss web server\htdocs
REQUEST_URI=/cgi-bin/barcsurvey.exe
SCRIPT_NAME=/cgi-bin/barcsurvey.exe
SCRIPT_FILENAME=C:\program files\abyss web server\cgi-bin\barcsurvey.exe
REQUEST_METHOD=GET
CONTENT_LENGTH=0
REMOTE_USER=
HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
HTTP_REFERER=http://ardai.dyndns.org/testsurvey.html
HTTP_ACCEPT_LANGUAGE=en-us
HTTP_ACCEPT_ENCODING=gzip, deflate
HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
HTTP_HOST=ardai.dyndns.org
HTTP_CONNECTION=Keep-Alive
HTTP_CACHE_CONTROL=no-cache

I have tried this with ie 6.0 sp1, netscape 7.1, and Opera 7.23 as my browser. Both the webserver and browser are running Win2K.

(edited to strip out more extraneous stuff from the html...)
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Aug 09, 2004 1:44 am    Post subject: Reply with quote

n1ist,

Your HTML code seems fine. But we recommend trying to change your HTML to <form action="/cgi-bin/barcsurvey.exe" ...>. We suspect that you're using a redirection service that changes the request.

Does it work now? If it is still not correct, please send to support@aprelium.com a compressed package containing your your HTML file and your .exe CGI application.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
n1ist
-


Joined: 05 Aug 2004
Posts: 4

PostPosted: Tue Aug 10, 2004 12:48 am    Post subject: Reply with quote

Ugh. Sometimes it is the obvious that gets you. The system() call does an exec so it didn't inherit the updated environment. Using getenv() to get the REQUEST_METHOD shows that it is POST. Thanks.
/mike
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group