Hello!
I've been trying for several hours to upload a few bits of data (not a file) from an html form to a server, and none of my variants have worked thus far. I've done some web searching, too.
Anyway, here's the form:
<form method="POST" action="mmsrequest"> <pre> UserID: <input type="text" NAME="userid"> Date : <input type="text" NAME="date" value="mm/dd/yy"> Time : <input type="text" NAME="time" value="hh:mm:ss"> <input type="submit"> <input type="reset"> </pre> </form>
I've tried mmsrequest as a script and as an executable. Full path, etc. In and out of cgi-bin.
Variants tried: method="GET"
I end up with a copy of the script (well, I told the browser not to bother trying to display the executable), instead of having the script run.
method="POST"
I either end up with a "Not Found" or "Method Not Allowed". I've always insured that permissions were rwxrwxrwx, just to avoid any permissions problem, expecting to tighten that up after I got the basic thing working.
I don't particularly care if the script or executable gets the information from the command line separated by ampersands and whatnot, environment variable (QUERY_STRING, or so I understand), or from standard input. However, I do care that the script/program gets run and does get the information somehow, on the server side.
Any suggestions?
Thank you, Chip Campbell
--On Tuesday, November 20, 2007 5:09 PM -0500 Charles E Campbell Jr charles.e.campbell@nasa.gov wrote:
Anyway, here's the form:
<form method="POST" action="mmsrequest">
That says the script is in the same directory as the form. Is your web server set up to allow scripts to be executed from the content directory? This will be restricted by both httpd.conf (and includes) and by SELinux, if enabled.
Which distro? Which version of Apache? What language is the script in?
Can you execute the script from the command line? (Many web script systems allow you to debug from the command line with some suitable setup, allowing you to test without an actual web server.)
Kenneth Porter wrote:
--On Tuesday, November 20, 2007 5:09 PM -0500 Charles E Campbell Jr charles.e.campbell@nasa.gov wrote:
Anyway, here's the form:
<form method="POST" action="mmsrequest">
That says the script is in the same directory as the form. Is your web server set up to allow scripts to be executed from the content directory? This will be restricted by both httpd.conf (and includes) and by SELinux, if enabled.
Which distro? Which version of Apache? What language is the script in?
Can you execute the script from the command line? (Many web script systems allow you to debug from the command line with some suitable setup, allowing you to test without an actual web server.)
My client side is a centos o/s... but the server side is an SGI. I've found the following in a couple of httpd.conf files (I've found three on the system): httpd.conf -- SGI Outbox Apache HTTP server config file... [ port 80 ]
In there:
<Directory /usr/people/*/public_html> AllowOverride FileInfo AuthConfig Limit Options Indexes Includes FollowSymLinks MultiViews </Directory>
The scripts and html page are in that sort of a directory, ie. /usr/people/cec/public_html , so I think the httpd.conf is the pertinent one.
How do I find out what version of Apache is installed? How do I find out if SELinux is enabled?
The script -- well, I've tried Kornshell:
#! /bin/ksh echo '$*<'$*'>' echo 'QUERY_STRING<'${QUERY_STRING}'>'
and I've written a small C file, compiled it, etc. In both cases I set permissions to rwxrwxrwx (and directory paths) just to make sure for now that they are not permission bound.
Both the script and executable work fine from the command line.
Thank you for helping, Chip Campbell
On Tue, 2007-11-20 at 17:09 -0500, Charles E Campbell Jr wrote:
Hello!
I've been trying for several hours to upload a few bits of data (not a file) from an html form to a server, and none of my variants have worked thus far. I've done some web searching, too.
Anyway, here's the form:
<form method="POST" action="mmsrequest"> <pre> UserID: <input type="text" NAME="userid"> Date : <input type="text" NAME="date" value="mm/dd/yy"> Time : <input type="text" NAME="time" value="hh:mm:ss"> <input type="submit"> <input type="reset">
^^^^^ How about changing type to "submit"?
</pre>
</form>
I've tried mmsrequest as a script and as an executable. Full path, etc. In and out of cgi-bin.
Variants tried: method="GET"
I end up with a copy of the script (well, I told the browser not to bother trying to display the executable), instead of having the script run.
method="POST"
I either end up with a "Not Found" or "Method Not Allowed". I've always insured that permissions were rwxrwxrwx, just to avoid any permissions problem, expecting to tighten that up after I got the basic thing working.
I don't particularly care if the script or executable gets the information from the command line separated by ampersands and whatnot, environment variable (QUERY_STRING, or so I understand), or from standard input. However, I do care that the script/program gets run and does get the information somehow, on the server side.
Any suggestions?
Thank you, Chip Campbell
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos