Hi Li, Rob and Mark.

Thanks for your help. My site is being hosted by Hypermart, so I don't have
access to /var/log/httpd. My new simpleform.cgi now looks like this:

#!/usr/local/bin/perl -wT
use CGI;
use strict;

$username = param('username');

print "Content-type: text/plain\n\n";
print "You entered: $username\n";

The permissions look like this:

Permissions for cgi-bin: rwxr-xr-x
Permissions for simpleform.cgi rwxr-xr-x
Permissions for simpleform.htm: rwxr-xr-x

I have changed <form method="post" action="../cgi-bin/simpleform.pl"> to
<form method="post" action="http://www.mikyo.com/cgi-bin/simpleform.cgi";>.

I am still getting the 500 error.

Thanks,

  - Mike

-----Original Message-----
From: Li Ngok Lam [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 1:16 PM
To: Mike Butler; [EMAIL PROTECTED]
Subject: Re: Problems getting a simple form to work.


[..]
>
> Can anyone tell me what I'm doing wrong? Also, is there a way to turn on
> error.log?

Actually, error.log is always turned on... If you are not running the server
on
yours own, ask the server admin where is the error.log located.

[..]

> Permissions for cgi-bin: rwxr-xr-x
> Permissions for simpleform.htm: rwxr-xr-x

What about your script ?  simpleform.pl

[..]

> #!/usr/local/bin/perl

use CGI; # You missed this
>
> $username = param('username');

You can't ask a value from param without use CGI in this case.

>
> print "Content-type: text/plain\n\n";
> print "You entered: $username\n";
>

One more point, when you are going to write a script for real running,
always use strict.... You will know how pain it is to remember all the
var names that you've declared along the whole script. And most likely
have to rewrite the whole thing again when touching to maintenence or
debugging...


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to