| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		bergermv -
 
  Joined: 20 Aug 2002 Posts: 1
 
  | 
		
			
				 Posted: Thu Aug 22, 2002 12:13 am    Post subject: Error 404 & 500 | 
				      | 
			 
			
				
  | 
			 
			
				When trying to run a perl script out of my cgi-bin directory I'm getting the above messages (which one depends on what I put in ACTION entity of my FORM html command).  It looks as if the server is not "seeing" my perl script file that is there.  Explorer returns "Page cannot be found".  Suffice it to say I've configured CGI Parameters as per instructions in this site and that I was running the ordinary "index" file that "pops up" once I go to "localhost" as URL (it's this file that refers to the perl script for it to run once the users "interacts" with this web page and inputs data into the form).
 
 
Thanks for your help. | 
			 
		  | 
	
	
		| Back to top | 
		
			          | 
		
	
	
		  | 
	
	
		aprelium -
 
  Joined: 22 Mar 2002 Posts: 6800
 
  | 
		
			
				 Posted: Thu Aug 22, 2002 3:45 am    Post subject: Re: Error 404 & 500 | 
				      | 
			 
			
				
  | 
			 
			
				 	  | bergermv wrote: | 	 		  When trying to run a perl script out of my cgi-bin directory I'm getting the above messages (which one depends on what I put in ACTION entity of my FORM html command).  It looks as if the server is not "seeing" my perl script file that is there.  Explorer returns "Page cannot be found".  Suffice it to say I've configured CGI Parameters as per instructions in this site and that I was running the ordinary "index" file that "pops up" once I go to "localhost" as URL (it's this file that refers to the perl script for it to run once the users "interacts" with this web page and inputs data into the form).
 
 
Thanks for your help. | 	  
 
Error 404 means that your script redirects to an inextistant page/script.
 
Error 500 means that your CGI script sends wrong headers/does something illegal.
 
So please check why both error messages occured using the above explanation. _________________ Support Team
 
Aprelium - http://www.aprelium.com | 
			 
		  | 
	
	
		| Back to top | 
		
			           | 
		
	
	
		  | 
	
	
		dtshedd -
 
  Joined: 02 Mar 2003 Posts: 1
 
  | 
		
			
				 Posted: Wed Mar 05, 2003 2:00 am    Post subject: Type 500 error | 
				      | 
			 
			
				
  | 
			 
			
				Okay, I have used Perl with PWS in the past withou a problem, but experiencing difficulties here. Reinstalled ActivePerl just in case, tried 2 different Aliases for cgi-bin, cgi-bin and /cgi-bin, not sure what the problem is, appreciate any suggestions
 
 
error message;
 
 
63.140.38.116 - - [04/Mar/2003:19:44:18 +1133] "GET /cgi-bin/example.pl HTTP/1.1" 500 439
 
 
 
contents of example.pl;
 
 
print "<HTML>";
 
print "<TITLE></TITLE>";
 
print "<BODY>";
 
print "<P>Hello from ActivePerl!";
 
print "</HTML>";
 
 
 
abyss configuration;
 
 
ServerRoot C:\PROGRAM FILES\ABYSS WEB SERVER\
 
Port 80
 
Path htdocs
 
KeepAlive 10
 
TimeOut 10
 
MaxConnections 20
 
ConsolePort 9999
 
CGIEnabled Yes
 
CGITimeOut 30
 
CGIUseRegistry No
 
CGIUseScript No
 
ExtendedLog No
 
AutoIndex Yes
 
SSIEnabled Yes
 
SSICmdEnabled No
 
SSIExtension shtml shtm stm
 
SSIErrorMsg 
 
SSITimeFmt 
 
SSISizeAbbrev No
 
CustomErrorDefault 
 
MIMEFile 
 
LogFile log/access.log
 
CGIErrorFile log/cgi.log
 
CGIPath /cgi-bin
 
alias "/cgi-bin" "/cgi-bin"
 
IndexFile index.html
 
IndexFile index.htm
 
MIMEType application/mac-binhex40 hqx
 
MIMEType application/msword doc
 
MIMEType application/octet-stream bin dms lha lzh exe class
 
MIMEType application/pdf pdf
 
MIMEType application/postscript ai eps ps
 
MIMEType application/smil smi smil
 
MIMEType application/vnd.mif mif
 
MIMEType application/vnd.ms-asf asf
 
MIMEType application/vnd.ms-excel xls
 
MIMEType application/vnd.ms-powerpoint ppt
 
MIMEType application/x-cdlink vcd
 
MIMEType application/x-compress Z
 
MIMEType application/x-cpio cpio
 
MIMEType application/x-csh csh
 
MIMEType application/x-director dcr dir dxr
 
MIMEType application/x-dvi dvi
 
MIMEType application/x-gtar gtar
 
MIMEType application/x-gzip gz
 
MIMEType application/x-javascript js
 
MIMEType application/x-latex latex
 
MIMEType application/x-sh sh
 
MIMEType application/x-shar shar
 
MIMEType application/x-shockwave-flash swf
 
MIMEType application/x-stuffit sit
 
MIMEType application/x-tar tar
 
MIMEType application/x-tcl tcl
 
MIMEType application/x-tex tex
 
MIMEType application/x-texinfo texinfo texi
 
MIMEType application/x-troff t tr roff
 
MIMEType application/x-troff-man man
 
MIMEType application/x-troff-me me
 
MIMEType application/x-troff-ms ms
 
MIMEType application/zip zip
 
MIMEType audio/basic au snd
 
MIMEType audio/midi mid midi kar
 
MIMEType audio/mpeg mpga mp2 mp3
 
MIMEType audio/x-aiff aif aiff aifc
 
MIMEType audio/x-pn-realaudio ram rm
 
MIMEType audio/x-realaudio ra
 
MIMEType audio/x-wav wav
 
MIMEType image/bmp bmp
 
MIMEType image/gif gif
 
MIMEType image/ief ief
 
MIMEType image/jpeg jpeg jpg jpe
 
MIMEType image/png png
 
MIMEType image/tiff tiff tif
 
MIMEType image/x-cmu-raster ras
 
MIMEType image/x-portable-anymap pnm
 
MIMEType image/x-portable-bitmap pbm
 
MIMEType image/x-portable-graymap pgm
 
MIMEType image/x-portable-pixmap ppm
 
MIMEType image/x-rgb rgb
 
MIMEType image/x-xbitmap xbm
 
MIMEType image/x-xpixmap xpm
 
MIMEType image/x-xwindowdump xwd
 
MIMEType model/iges igs iges
 
MIMEType model/mesh msh mesh silo
 
MIMEType model/vrml wrl vrml
 
MIMEType text/css css
 
MIMEType text/html html htm
 
MIMEType text/plain asc txt
 
MIMEType text/richtext rtx
 
MIMEType text/rtf rtf
 
MIMEType text/sgml sgml sgm
 
MIMEType text/tab-separated-values	tsv
 
MIMEType text/xml xml
 
MIMEType video/mpeg mpeg mpg mpe
 
MIMEType video/quicktime qt mov
 
MIMEType video/x-msvideo avi
 
Version 1.1
 
login dtshedd
 
password 376144d1799a642100980adb7b990d57
 
cgiinterpreter "C:\Perl\bin\perl.exe" pl cgi
 
cgipath / | 
			 
		  | 
	
	
		| Back to top | 
		
			          | 
		
	
	
		  | 
	
	
		aprelium -
 
  Joined: 22 Mar 2002 Posts: 6800
 
  | 
		
			
				 Posted: Wed Mar 05, 2003 11:31 pm    Post subject: Re: Type 500 error | 
				      | 
			 
			
				
  | 
			 
			
				 	  | dtshedd wrote: | 	 		  Okay, I have used Perl with PWS in the past withou a problem, but experiencing difficulties here. Reinstalled ActivePerl just in case, tried 2 different Aliases for cgi-bin, cgi-bin and /cgi-bin, not sure what the problem is, appreciate any suggestions
 
 
error message;
 
 
63.140.38.116 - - [04/Mar/2003:19:44:18 +1133] "GET /cgi-bin/example.pl HTTP/1.1" 500 439
 
 
 
contents of example.pl;
 
 
print "<HTML>";
 
print "<TITLE></TITLE>";
 
print "<BODY>";
 
print "<P>Hello from ActivePerl!";
 
print "</HTML>";
 
 | 	  
 
Your script is not CGI conformant. In fact, it doesn't  send a CGI header.
 
Change it as follows:
 
 	  | Code: | 	 		  
 
print "Status: 200 OK";
 
print "";
 
print "<HTML>";
 
print "<TITLE></TITLE>";
 
print "<BODY>";
 
print "<P>Hello from ActivePerl!";
 
print "</HTML>";
 
 | 	  
 
We recommend also reading the CGI spec (you'll find the link in the Abyss Web Server documentation) if you intend to write your scripts without using a CGI library. _________________ Support Team
 
Aprelium - http://www.aprelium.com | 
			 
		  | 
	
	
		| Back to top | 
		
			           | 
		
	
	
		  | 
	
	
		 |