![]() |
|
||
|
|
|
||
|
|
|||
|
|
|||||||
| Notices |
| Legacy Archived Main Board Business chat and general industry chat. All participation is welcome. Dont post your fucking spam here. |

![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
I put in a script and can't access a certain area due to the need to put in the full path to the file... Is there an easy way to find out the full path on a server without waiting to ask the hosting support?
|
|
|
|

|
|
#2 |
|
Happiness is an anagram of penis pash...
Join Date: Oct 2002
Location: Brisbane
Posts: 879
|
Hmm been a while since I did this but if memory serves me correctly...
If you have SSH/Telnet access to the server, you can login, cd to the directory in question and then type: pwd That should tell you the full path of where you are. I'm sure one of the real tech gurus will shout me down if I'm wrong.
|
|
|
|
|
|
#3 |
|
Jebus loves me
Join Date: Dec 2004
Location: 40 Oz to Freedom
Posts: 857
|
I think I understand. If it is a linux box you can use the whereis command.
ie: whereis "filename" with "filename" being the file you want to see the path for.
__________________
Sigless |
|
|
|
|
|
#4 |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
I don't have shell access
I need the part of the path that is before the cgi-bin directory which is in the root of my account |
|
|
|
|
|
#5 |
|
I'm the guy that pokes anthills with sticks
Join Date: Jan 2005
Location: West Palm Beach, FL USA
Posts: 31
|
#!/usr/bin/perl
print "Content-type: text/html\n\n"; open(PWD,'pwd|'); $pwd = join('', $pwd =~ s/\n//gi; close PWD; print "Current working directory: $pwd ";
__________________
This is my sig. There are many others like it but this one is mine |
|
|
|
|
|
#6 | |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
Quote:
... lost me... how do I need to be logged in to use those commands?
|
|
|
|
|
|
|
#7 |
|
Fat Fucking Nobody
Want to see your own Advertising Here!
Join Date: Oct 2002
Posts: 6,523
|
Most FTP clients will let you run a "PWD".
FTP in, change to the directory in question and execute PWD via FTP. in WS_FTP for instance it would be File->Operations->PWD |
|
|
|
|
|
#8 |
|
Omnipotent Ruler Of Perversion
Join Date: Oct 2002
Location: SouthEast Florida
Posts: 810
|
Create a file. Name it "info" without the quotes.
Put cd34's code in it. Place this file in your cgi-bin. Chmod it 755 Point your web browser to it, like this http://terrizamore.com/cgi-bin/info |
|
|
|
|
|
#9 | |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
Quote:
|
|
|
|
|
|
|
#10 | |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
Quote:
|
|
|
|
|
|
|
#11 |
|
Omnipotent Ruler Of Perversion
Join Date: Oct 2002
Location: SouthEast Florida
Posts: 810
|
Did you chmod 755 it?
You can give it the extension of .cgi if your server needs it. |
|
|
|
|
|
#12 | |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
Quote:
added the extention and still get server error
|
|
|
|
|
|
|
#13 |
|
Omnipotent Ruler Of Perversion
Join Date: Oct 2002
Location: SouthEast Florida
Posts: 810
|
Make sure that you have cd34's code exactly without any html tags, no body and head tags etc.
Maybe this isn't where Perl is located on your server. #!/usr/bin/perl Try #!/usr/local/bin/perl You can also try .pl for the extension. |
|
|
|
|
|
#14 | |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
Quote:
|
|
|
|
|
|
|
#15 |
|
One Miiiiiiiiilllllliiiiiiooooonnnnn Dollars
Join Date: Jul 2004
Location: Panamá
Posts: 1,585
|
can you give us a url or ip so we can try to find out what kind of box is it? cause if perl did not work by default you may not have that enabled or you are on a windblows box (which i doubt)
|
|
|
|
|
|
#16 | |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
Quote:
|
|
|
|
|
|
|
#17 |
|
Members
Join Date: Aug 2004
Posts: 8
|
http://www.adulttemplete.com/server.zip
this zip has a .cgi file setting to 777 in the cgi bin and then open it in a browser and the info is there the php file can be used anywhere else |
|
|
|
|
|
#18 |
|
Fat Fucking Nobody
Want to see your own Advertising Here!
|
__________________
We are putting the bastards of this world on notice; greed and corruption will always be met with "a voice made of ink and rage." "Never try and be like anyone else" - Hunter S. Thompson "The truth is the truth no matter how you try and package a lie" - Shellee Hale
|
|
|
|
|
|
#19 |
|
Members
Join Date: Aug 2004
Posts: 8
|
Done
|
|
|
|
|
|
#20 | |
|
It's always business, never personal!
The POWER of radio Oprano Radio
Join Date: Aug 2004
Location: On a golf course
Posts: 4,916
|
Quote:
|
|
|
|
|
|
|
#21 |
|
Members
Join Date: Aug 2004
Posts: 8
|
Thanks I should have been more on the ball
|
|
|
|
|
|
#22 | |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
Quote:
|
|
|
|
|
|
|
#23 |
|
Members
Join Date: Aug 2004
Posts: 8
|
hummmmmmm just deleted and reloaded then downloaded and checked it should work now if not hit me up on icq and i'll mail them to you
|
|
|
|
|
|
#24 | |
|
Members
Join Date: Mar 2005
Location: Florida
Posts: 215
|
Quote:
awesome.... thanksnice script...
|
|
|
|
|
![]() |
| Bookmarks |
|
|