View previous topic :: View next topic |
Author |
Message |
empanad0 -
Joined: 31 Jul 2003 Posts: 6
|
Posted: Thu Jul 31, 2003 3:49 pm Post subject: CGI problem |
|
|
im having trouble accessing the my cgi scripts online; i get access denied _________________ (= |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Jul 31, 2003 6:28 pm Post subject: Re: CGI problem |
|
|
empanad0 wrote: | im having trouble accessing the my cgi scripts online; i get access denied |
What is the exact error you get? Is it generate by Abyss Web Server or by another software (see the signature in the bottom of the error page)? Does your scripts work when you access them locally (using http://127.0.0.1 on your computer)? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
empanad0 -
Joined: 31 Jul 2003 Posts: 6
|
Posted: Fri Aug 01, 2003 1:29 am Post subject: |
|
|
HTTP 500 - Internal server error
thats what i get, and im using 192.168.1.2; i connect the internet through router although my ports are forwarded _________________ (= |
|
Back to top |
|
|
os17fan -
Joined: 21 Mar 2003 Posts: 531 Location: USA
|
Posted: Fri Aug 01, 2003 3:12 am Post subject: |
|
|
I Know a good way how you can tell whats wrong with a Perl or CGI , add this line at the top of every CGI or Perl program
Code: | use CGI::Carp qw(fatalsToBrowser); |
Instead showing a Internal 500 Error , it will display the problem on the browser it self. _________________ This web server is the best ! |
|
Back to top |
|
|
empanad0 -
Joined: 31 Jul 2003 Posts: 6
|
Posted: Fri Aug 01, 2003 5:49 am Post subject: |
|
|
I used the line of code you posted, however the problem is that the server isnt really reading into the cgi folder; it doesnt get to execute the script, doesnt even read the HTML page thats being used to execute it. _________________ (= |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Aug 01, 2003 6:25 pm Post subject: |
|
|
empanad0 wrote: | I used the line of code you posted, however the problem is that the server isnt really reading into the cgi folder; it doesnt get to execute the script, doesnt even read the HTML page thats being used to execute it. |
Error 500 means that the server was unable to run correctlty your CGI script. What is the language used the script is written in (Perl, PHP, other?), is there an error log in the cgierror.log file? What operating system are you using? If the script is short, can you post it here for verification?
You can also search these forums for "error 500" to see what are the common solution to the common script problems resulting in such an error. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
empanad0 -
Joined: 31 Jul 2003 Posts: 6
|
Posted: Fri Aug 01, 2003 7:08 pm Post subject: |
|
|
#!c:/perl/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use CGI;
$CGI::POST_MAX = 2048;
print "content-type: text/html\n\n";
binmode(STDIN);
@inx = <STDIN>;
@filetest = <STDIN>;
$str = @inx[1];
$str1 = reverse $str;
$filename1 = "";
$currchar = "";
$offset = 3;
while ($currchar !~ /\\/) {
$currchar = substr($str1, $offset, 1);
if ($currchar !~ /\\/) {
$filename1 = "$filename1$currchar";
$offset++;
}
}
$filename2 = reverse $filename1;
splice(@inx,0,4);
splice(@inx,$#inx,1);
$in = join("",@inx);
$in = substr($in,0,length($in) - 2);;
#
open(ff,">../$filename2");
binmode(ff);
print ff $in;
close(ff);
print "DONE, Uploaded Size: ".length($in)." bytes\n";
print "<br>View file at: <a href=\"24.193.135.36/$filename2\">$filename2</a>";
this is the code, its an upload script _________________ (= |
|
Back to top |
|
|
empanad0 -
Joined: 31 Jul 2003 Posts: 6
|
Posted: Sat Aug 02, 2003 1:39 am Post subject: |
|
|
Nevermind, i know what it was!! Thanks, ur were a BIG help!
I got it working now (= _________________ (= |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Aug 02, 2003 3:51 pm Post subject: |
|
|
empanad0 wrote: | Nevermind, i know what it was!! Thanks, ur were a BIG help!
I got it working now (= |
Can you please tell us what was wrong? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
empanad0 -
Joined: 31 Jul 2003 Posts: 6
|
Posted: Tue Aug 05, 2003 4:16 am Post subject: |
|
|
My paths were all wrong, and I was using the wrong version perl interpreter _________________ (= |
|
Back to top |
|
|
|