Free2Code
The majority of forums are now only available as archives, which means posting/editing is disabled.

The Anything and Everything forum is still open.
 
Time: 2013-05-19, 03:36am
cgi and ascii
Subject: cgi and ascii  ·  Posted: 2005-05-31, 12:17pm
Rank: Unregistered
Hi i am trying to run cgi script on my local machine but getting this error

The server encountered an internal error or misconfiguration and was unable to complete your request.

if i use the perl test.cgi command i get the script but if i type test.cgi i get
Bad command or file nam

message, code i have used is following

Code:
  1. #!/usr/local/bin/perl    
  2.         use warnings;
  3. use strict;
  4.     use CGI;    
  5.         
  6.     $query = new CGI;    
  7.         
  8.     print $query->header;    
  9.         
  10.     print "<html><head><title>A test</title></head>\n";    
  11.     print "<body>The test was successful.</body></html>";


path to my cgi-bin is C:\apache\cgi-bin and perl is insltalled on C:\perl
I have installed ws-ftp95 to upload the script in ascii mode but i dont know how to connect with local host i tried to use the tutorial at http://www.atlas.spaceports.com/~wysardry/ftp/wsftp03a.htm but could not get anywhere can someone help me pls. I have just started cgi and this code i took from the book
thank you
 
  Reply to this ·  Post link ·  Top
Subject: Re: cgi and ascii  ·  Posted: 2005-07-11, 03:38pm
Rank: ? (29)
Member #: 16569
You have your perl path wrong in the first line.

 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

Penguino AVR

Want to learn about robotics or microcontrollers?
Check out the Penguino AVR from our friends at
Icy Labs