Welcome to WebmasterWorld Guest from 54.167.102.69

Forum Moderators: bakedjake

Message Too Old, No Replies

what does base UNIX directory mean?

     
12:37 pm on Jun 13, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 16, 2001
posts:585
votes: 0


what does base UNIX directory mean?
Is this right?
$config = "/usr/home/directory/directory/filename";

or

$config = "/usr/home/public_html/directory/directory/filename";

this is the url:
www.domainname.com/testing/cgi-bin/filename

Thanks for your help

4:52 pm on June 13, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 6, 2000
posts:904
votes: 0


Unfortunately there's no single answer to this - it all depends on the setup of your server. If you have telnet access to your server, you can find out by typing 'pwd' from the directory where your .html files reside, but if not your hosting company should be able to tell you.
6:27 pm on June 13, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 16, 2001
posts:585
votes: 0


Unfortunately, the company that is hosting my site told me I do not have telnet access because I share the server with too many people and they have security issues if I have telnet access. I asked them to give me the Unix directory, (and told them where the file currently resides, but have not heard back).

Are there standard ways that severs are setup that I could find out through trial and error?

I am getting a: No such file or directory error message. I know the file is on the server, but guess I have the Unix directory wrong.

I appreciate your help and expertise.

Paul

6:33 pm on June 13, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 6, 2000
posts:3928
votes: 0


It may be a case of miscommunication with your host... ask them specifically what the "file path" is to your html directory.

On one of my accounts the path to my cgi-bin is /home/username/virtual/cgi-bin, on another account it's /home/username/public_html/cgi-bin... and I've seen others that were much longer and more convoluted.

6:52 pm on June 13, 2001 (gmt 0)

Full Member

10+ Year Member

joined:Feb 28, 2001
posts:208
votes: 0


If you are allowed PHP scripts try this:
---------
<?
phpinfo();
?>
---------

In the resulting page look for the section labled Apache Environment. The first thing listed should be Document Root, which may be what you are looking for.

8:24 am on June 14, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 6, 2000
posts:904
votes: 0


Good point evinrude, I hadn't thought of that. The same idea in Perl:

#!/usr/bin/perl

print "content-type: text/html\n\n";

print "$ENV{DOCUMENT_ROOT}";

12:39 pm on June 14, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 16, 2001
posts:585
votes: 0


My ISP finally got back to me, "/usr/local/www/virtual/shellname/cgi-bin/superguestconfig <-- where
'shellname' enter your ftp username."

I tried this, but am still being told it can not find the file. Any advice?

Do you put the perl code at the top of the script?

5:00 pm on June 14, 2001 (gmt 0)

Full Member

10+ Year Member

joined:Feb 28, 2001
posts:208
votes: 0


Hmmmm...another thought...

The first line of a perl script is generally something along the lines of:
#!/usr/bin/perl

This tells the script where to find the perl interpreter. If this line does not match the actual location Perl on the system you are using it will generate a File Not Found error ("No such file or directory") On an old FreeBSD system I have an account on, for example, the admin installed it to /usr/local/bin/perl. You might wanna check the location.