Skip to content

How to Determine Absolute Path

This tutorial shows you how to determine Absolute Path for your Mambo (or Joomla!) web site.

When uploading from a local testing server to a web server the absolute path also needs to be updated.
The absolute path is the directory where Mambo is located on the server hard drive.

This small PHP script will report the actual absolute path.

  • Make a new PHP file and call it something like serverpath.php
  • Right at the top, with no spaces before it, add this PHP Code:
    <?php echo $_SERVER['DOCUMENT_ROOT']; ?>
  • Place (upload) this script in the directory where you want to find the absolute path.
  • Point a browser to this script and the path will appear in the browser.

On a Linux server, that will give you something like this example:
/var/www/example.com/httpdocs

In the Mambo or Joomla 1.0 configuration.php file, the above example would be used like this:

$mosConfig_absolute_path = '/var/www/example.com/httpdocs';

If you enjoyed this post, make sure you subscribe to my RSS feed!

Topic: Mambo Tutorials
Tagged as: absolute path, document root, Joomla, Linux, Mambo, PHP, web server

Share on FriendFeed

{ 0 comments… be the first to comment }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Any comments that look like spam will be treated as spam - this includes SEO titles and use of spurious keywords.

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.