Base path question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mkx
    Confirmed User
    • Nov 2003
    • 4001

    #1

    Base path question

    I am installing a script for someone and their hosting live support takes 10 minutes to not answer my question on what the Base path (ex /home/username/www) is for the account. Is there any way to figure this out without getting the info from the host? Kind of in a rush here
  • Methodcash Rick
    Confirmed User
    • Jul 2004
    • 1720

    #2
    Originally posted by raulph
    I am installing a script for someone and their hosting live support takes 10 minutes to not answer my question on what the Base path (ex /home/username/www) is for the account. Is there any way to figure this out without getting the info from the host? Kind of in a rush here
    Yes,

    If you can SSH or telnet into the machine just type pwd and that will give you the full path..

    If you can't get in, You'll have to wait for support to help

    Comment

    • StuartD
      Sofa King Band
      • Jul 2002
      • 29903

      #3
      If it's a php script, $_SERVER[DOCUMENT_ROOT]; will work too.
      This is me on facebook
      This is me on twitter

      Comment

      • mkx
        Confirmed User
        • Nov 2003
        • 4001

        #4
        Thanks for the advise but telnet takes 3 hours to activate with this host. I will just wait another 10 min for the guy to reply on live support and hopefully it will be with an answer this time

        Comment

        • mkx
          Confirmed User
          • Nov 2003
          • 4001

          #5
          What's that php script that pulls up all the server/php information that you can upload? Does that tell you the root path?

          Comment

          • Methodcash Rick
            Confirmed User
            • Jul 2004
            • 1720

            #6
            That would be phpinfo.php

            Just make a new document and put in
            Code:
            <? phpinfo(); ?>
            Then upload it where the script is.. Open the file in your browser, and look for _SERVER["SCRIPT_FILENAME"] which will be under "Php Variables" and that will be your full base path...

            Comment

            • mkx
              Confirmed User
              • Nov 2003
              • 4001

              #7
              Thanks rick. My server provider serverprovider told me to use servercheck.cgi and it did the trick as well. Thanks again!

              Comment

              Working...