Sending data from client stack to CGI-Data stack?
Posted: Mon Jun 16, 2008 12:45 am
Hi All...
I have two stacks.
One is set up on the server and contains 1 field and the stack script:
on librarystack
put the $QUERY_STRING into theTerms
put theTerms into cd fld "data" of cd 1 of current stack
end libraryStack
The second stack is the client stack and it contains just one field and a button. The button script is:
on mouseUp
put cd fld "theInput" int theDataToSend
post theDataToSend to URL "http:10.51 0.12/cgi-bin/postdata.cgi"
--put it
end MouseUp
I also have a simple "postdata.cgi" file that points to the server stack:
#!rev
on startup
library "postdata.rev"
end startup
I'm attempting to wrap my head around the idea of using stack cgi to save and retrieve data from other stacks. However, I am obviously missing a few steps.
All the example cgi that rely on text cgi, and stack cgi work fine for me. So I know that the rev cgi is working.
I have not been able to find an example of a stack that uses the post/get command to send data to the rev cgi script in a stack library and then saves the data to the rev stack.
I'm attempting to create the most basic example to get this to work first be fore moving on.
When I get "it" the result is:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
you@example.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
Thanks in advance for any suggestions you may have!
I have two stacks.
One is set up on the server and contains 1 field and the stack script:
on librarystack
put the $QUERY_STRING into theTerms
put theTerms into cd fld "data" of cd 1 of current stack
end libraryStack
The second stack is the client stack and it contains just one field and a button. The button script is:
on mouseUp
put cd fld "theInput" int theDataToSend
post theDataToSend to URL "http:10.51 0.12/cgi-bin/postdata.cgi"
--put it
end MouseUp
I also have a simple "postdata.cgi" file that points to the server stack:
#!rev
on startup
library "postdata.rev"
end startup
I'm attempting to wrap my head around the idea of using stack cgi to save and retrieve data from other stacks. However, I am obviously missing a few steps.
All the example cgi that rely on text cgi, and stack cgi work fine for me. So I know that the rev cgi is working.
I have not been able to find an example of a stack that uses the post/get command to send data to the rev cgi script in a stack library and then saves the data to the rev stack.
I'm attempting to create the most basic example to get this to work first be fore moving on.
When I get "it" the result is:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
you@example.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
Thanks in advance for any suggestions you may have!