PDA

View Full Version : how can i find my paths



is0lized
June 5th, 2002, 08:05
any way i can use some kind of script that will find my paths cgi / sendmal / full dir path


all that happy stuff?

bigperm
June 5th, 2002, 08:45
Of course. Just upload perldiver and chmod 755.

bigperm
June 5th, 2002, 08:47
Don't forget to rename it to .cgi or .pl

is0lized
June 5th, 2002, 09:13
i did what you said, it views as text i did all the right things


kinda useless if i dont know the cgi path, isnt it? lol

bigperm
June 5th, 2002, 16:01
To find the document root:



#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "Document Root is: ";
print $ENV{'DOCUMENT_ROOT'};


Copy and paste that, save it as something.cgi, upload and chmod 755. That will tell you your document root.

Perldiver works for me
http://www.bigperm.org/cgi-bin/perldiver.cgi

Seldimis
June 5th, 2002, 16:39
Ask your host !!! :D :D :D

is0lized
June 5th, 2002, 16:45
im hosted for free by a friend, and shes very lazy

YUPAPA
June 5th, 2002, 21:08
#!/usr/bin/perl

print "Content-Type: text/html\n\n";
print q(Path to this script is: $0);

DCI
June 5th, 2002, 21:18
i tried them all too. I also get Internal Server Error

YUPAPA
June 5th, 2002, 22:02
Incorrect Perl Path??
EAT THIS:



#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "The path to this script is ". $ENV{'SCRIPT_NAME'};

Dusty
June 5th, 2002, 22:07
I'm guessing your shebang line is wrong. Try just using #!perl, that will usually work. If not, telnet to the server and type "whereis perl". If that fails, type "which perl". One of those will give you the right path. If you can't do that, bug your friend until she answers you.

YUPAPA
June 5th, 2002, 22:11
ARE you doing it using telnet?
IF not, did u upload it ASCII mode?? have the right permission??
Maybe your friend has not added any cgi-script handler??

is0lized
June 5th, 2002, 23:11
i found out my paths... i used a diffrent perldiver script