"Undefined subroutine &main::param called at simpleform.cgi line 6."


Is the error I get for your script when I execute it from
http://www.mikyo.com/cgi-bin/simpleform.cgi

If you want to try what I did, do the following:
1. type in http://www.mikyo.com/cgi-bin/simpleform.cgi to your web
browser
2. You will get the error above.

Are you sure the CGI module is installed on Hypermart's servers?

You can send them an email to see.

CGI module is not a standard part of my web hoster either, so you might
want to find a hosting site that will install it for you.  There are
ways you can install CPAN modules yourself on the Hypermart server, but
I think you need to rebuild the module with some details about where
you'll be installing it.  This is covered in 12.7 and 12.17 in Perl
Cookbook.

Mark




I tried to go to Hypermart to look at their CGI implementation, that is,
where they say to get access to your CGI programs, but I couldn't until
I signed up.  They have a free option, but oddly they require a credit
card even for the zero-dollar option.

So, I would look at their CGI FAQ (

>> -----Original Message-----
>> From: Mike Butler [mailto:[EMAIL PROTECTED]
>> Sent: Friday, April 04, 2003 12:58 PM
>> To: Li Ngok Lam; [EMAIL PROTECTED]
>> Subject: RE: Problems getting a simple form to work.
>> 
>> 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]



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

Reply via email to