sreebharat
06-12-2008, 02:07 PM
Hi All,
when I execute the following code from IE and click on submit button, I am getting 500 internal server error.
<html>
<head>
<title> Thinking of love </title>
</head>
<body>
<a href="http://www.google.co.in/"> visit google.co.in </a>
<form method="GET" action="http://www.dhookan.com/cgi-bin/test.py">
<p> Your first name: <input type ="text" name="first name">
<p> Your last name: <input type ="text" name="last name">
<p> Click here to submit form <input type = "submit"
value="yeah">
<input type="hidden" name="session" value="1f9a2">
</form>
</body>
</html>
test.py code:
#!/usr/bin/python
print "Content-type: text/html\n\n";
print "<html><body><h1>Hello World!";
print "</h1></body></html>\n";
Even perl file also gives the same error. All files have 755 permission. When I execute test.py at shell prompt, it executes perfect. What is wrong with cgi?
Can you plz clarify me on this?
Thanks
Bharat
when I execute the following code from IE and click on submit button, I am getting 500 internal server error.
<html>
<head>
<title> Thinking of love </title>
</head>
<body>
<a href="http://www.google.co.in/"> visit google.co.in </a>
<form method="GET" action="http://www.dhookan.com/cgi-bin/test.py">
<p> Your first name: <input type ="text" name="first name">
<p> Your last name: <input type ="text" name="last name">
<p> Click here to submit form <input type = "submit"
value="yeah">
<input type="hidden" name="session" value="1f9a2">
</form>
</body>
</html>
test.py code:
#!/usr/bin/python
print "Content-type: text/html\n\n";
print "<html><body><h1>Hello World!";
print "</h1></body></html>\n";
Even perl file also gives the same error. All files have 755 permission. When I execute test.py at shell prompt, it executes perfect. What is wrong with cgi?
Can you plz clarify me on this?
Thanks
Bharat