KB / Web Programming / CGI, PHP, and Databases / Where is....?
From DreamHost
Contents |
Parent Article
A dictionary file like /usr/dict/words?
We keep our dictionary file at /usr/share/dict/words on all our servers.
There are lots of uses for a dictionary file in simple scripts (games, password validators, etc.)
What is the path to my home directory?
The path to your home directory is:
/home/username/ (where "username" is your username)
The root directory of your domain is by default:
/home/username/domain.com/ (where "username" is your username and "domain.com" is your domain)
Note that these paths in the unix file system do not include "http://".
Where is the perl interpreter?
/usr/bin/perl is the path to perl on our systems.
At least some servers also have /usr/local/bin/perl linked to /usr/bin/perl, but using /usr/bin/perl is recommended.
Where is PHP?
/usr/local/bin/php is a PHP4 binary.
You can also use the cgi binaries, which you need to do in order to manually run PHP5:
/dh/cgi-system/php.cgi
/dh/cgi-system/php5.cgi
Where is date?
/bin/date is the path to date on our systems.
Where is sendmail?
/usr/sbin/sendmail is the path to sendmail on our systems.
Note: If you plan to use sendmail for bulk mail purposes, please review our anti-spam policies and resources page.
Where is cgi-bin?
/home/username/domain.com/cgi-bin (where "username" is your username and "domain.com" is your domain)
If you have CGI access enabled, CGI scripts can run in any directory. See: Do I have to put my cgi scripts in a special cgi-bin directory? Where is it?
Where is ???
If you have shell access, you can use 'whereis' to locate the path of something. Examples: type 'whereis perl' or 'whereis python'. Usually the first answer is the path to use.

