cpanel username and path question

cpanel username and path question

Posted by: sharpdebate
Posted on: 2006-05-15 03:41:00

Hi guys

I am trying to install a script in my dreamhost account, and they are asking for a path like -

/home/MY CPANEL USERNAME/public_html/

By googling, I found that for dreamhost, it should (?) be -

/home/MY CPANEL USERNAME/mydomain.com/

now since I want to install the script in mydomain.com/mydirectory/ , I guess my script path will be

/home/MY CPANEL USERNAME/mydomain.com/mydirectory/

is it correct? Besides, how can I know what's my cpanel username for DH? When I sign in my DH control panel, I use my email address, and no username ...

any tips / help friend?
thanks

Web's ultimate debate center - www.SharpDebate.comEdited by sharpdebate on 05/15/06 03:44 AM (server time).

Re: cpanel username and path question

Posted by: scjessey
Posted on: 2006-05-15 05:06:00

If you are using PHP, use the server variable $_SERVER['DOCUMENT_ROOT'] as the path. That equates to /home/username/domainfolder/. For example, if you have a folder called includes in your web root, containing a file that connects to your database, the code for the include would be something like this:

<?php include($_SERVER['DOCUMENT_ROOT']."/includes/db.php"); ?>

That is functionally equivalent to:

<?php include("/home/username/domainfolder/includes/db.php"); ?>

--------
Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code SCJESSEY97

Re: cpanel username and path question

Posted by: norm1037
Posted on: 2006-05-15 05:06:00

Yes that path looks okay.

You can find out your username under the 'users|manage users' section.

Then just replace MY CPANEL USERNAME with the username.


Tags: cpanelemail addressmydomaindreamhostgooglingpublic htmlguesscontrol paneldebateultimate