View previous topic :: View next topic |
Author |
Message |
kopf1988 -
Joined: 01 Jun 2003 Posts: 7
|
Posted: Sun Jun 01, 2003 9:20 pm Post subject: error- 405 Method not allowed |
|
|
I know I have CGI setup right. I have / as one of the CGI thingys so it can execute CGI scripts anywhere.
but I still get that error whenever I use this script(even if I have the #! thing included)-
if ($ENV{'REQUEST_METHOD'} eq "GET") {
$in = $ENV{'QUERY_STRING'};
} else {
$in = <STDIN>;
}
open (USERS, ">>/doc/uas/users.txt");
close USERS;
print <<END;
Content-Type: text/html\n\n
<html>
<body bgcolor="black">
<font color="red">Thank you for submitting your info! I'll read it soon.<a href="http://kopf1988.tripod.com/index.html">Click Here to go back.</a></font>
</body></html>
END
And my form is like this-
<!-- Sign Up form -->
<form method="post" action="/doc/cgi-bin/signup.cgi"><br>
Please choose an appropriate username.<br>
<input type="text" name="uname"><br>
Please choose a password, don't use something someone can guess.<br>
<input type="password" name="pass1"><br>
Please Retype your password so we know you can remember it.<br>
<input type="password" name="pass2"><br>
<input type="submit" Value="Submit!"><input type="Reset" Value="Reset"><br>
</form>
<!--End Sign Up form -->
Why don't it work?!! |
|
Back to top |
|
|
kopf1988 -
Joined: 01 Jun 2003 Posts: 7
|
Posted: Sun Jun 01, 2003 10:34 pm Post subject: |
|
|
Now i am getting a 500 error... |
|
Back to top |
|
|
kopf1988 -
Joined: 01 Jun 2003 Posts: 7
|
Posted: Sun Jun 01, 2003 10:52 pm Post subject: . |
|
|
This is my new script that gets a 500 error-
I have also tried to change the #! to #!C:\Perl\ also. Then I tried it without any of the #!(i have the complier set in the server so that should work too...). The only data I am sending to it is ?GP=10 . Why doesn't That work?
#!C:\Perl\bin\perl.exe
# #!/usr/local/bin/perl
if ($ENV{'REQUEST_METHOD'} eq "GET") {
$in = $ENV{'QUERY_STRING'};
} else {
$in = <STDIN>;
}
#$ENV{'REDIRECT_SCRIPT_NAME'} = $RSN;
print <<END;
Content-Type: text/html\n\n
<html>
<body>
Hi!
#$RSN
</body>
</html>
END |
|
Back to top |
|
|
kopf1988 -
Joined: 01 Jun 2003 Posts: 7
|
Posted: Sun Jun 01, 2003 11:19 pm Post subject: .. |
|
|
OK, I opened it through perl through MS-DOS and I figured out there was something wrong with the-
print <<END;
...
END
part of the file. I commmented the print and end and put the whole thing on one print line like -print "..." - and that worked. What is wrong? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Jun 03, 2003 1:25 am Post subject: Re: .. |
|
|
It seems like you have a Perl syntac error. When you receive error 500, usually inspect the cgi.log file as Perl will dump there the error messages. Error 500 with Perl usually means that the Perl script has a compilation or stratup error. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
joeyc -
Joined: 16 Jun 2003 Posts: 12 Location: KY
|
Posted: Mon Jun 16, 2003 1:41 pm Post subject: Error - 405 |
|
|
Thanks.. Its working now!!!
Last edited by joeyc on Tue Jun 17, 2003 4:15 am; edited 1 time in total |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Jun 16, 2003 8:10 pm Post subject: Re: Error - 405 |
|
|
Open your access.log file and tell us what URL gives your error 405? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
joeyc -
Joined: 16 Jun 2003 Posts: 12 Location: KY
|
Posted: Mon Jun 16, 2003 11:38 pm Post subject: |
|
|
hey again
208.135.168.112 - joeyc [16/Jun/2003:08:27:05 -0400] "POST /cgi-bin/test.pl HTTP/1.1" 405 275 "http://j-c.cjb.net/admin/notes.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
Thank-You |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Jun 19, 2003 2:21 pm Post subject: |
|
|
joeyc wrote: | hey again
208.135.168.112 - joeyc [16/Jun/2003:08:27:05 -0400] "POST /cgi-bin/test.pl HTTP/1.1" 405 275 "http://j-c.cjb.net/admin/notes.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
Thank-You |
Have ypu installed Perl support in Abyss in order to be able to execute .pl scripts? If not, please read http://www.aprelium.com/abyssws/perl.html and follow the instructions carefully (the error you get clearly states that pl files are not considered as scripts because your CGI setup is missing or not correct). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
rockslammer -
Joined: 19 Jun 2003 Posts: 5
|
Posted: Thu Jun 26, 2003 7:37 am Post subject: Re: error- 405 Method not allowed |
|
|
Quote: |
<form method="post" action="/doc/cgi-bin/signup.cgi"><br>
Why don't it work?!! |
try this, move signup.cgi to the cgi-bin directory
<form method="post" action="/cgi-bin/signup.cgi">
sounds like a permissions problem
also remember where ever you put your cgi it must be READ AND EXECUTE to any user that needs to access it
CHECK THE OBJECT'S PROPERTIES
I have found NO permissions problems running the cgi and pl files from the cgi-bin directory in the server.
they run right by default if your perl path is right.
is the form on tripod?
if so its a path problem
<form method="post" action="http://your IP or domain/cgi-bin/signup.cgi">
be careful if you are pathing to your IP from a free page domain.
rock
http://www.compro-serve.com |
|
Back to top |
|
|
|