Title: Timthumb &#8211; Paths
Last modified: August 21, 2016

---

# Timthumb – Paths

 *  [SlashMiester](https://wordpress.org/support/users/slashmiester/)
 * (@slashmiester)
 * [13 years ago](https://wordpress.org/support/topic/timthumb-paths/)
 * Hi there I am trying to get timthumb working on my site. I have contacted the
   host company who gave me the paths to add to the timthumb file.
 * My question is which line do i add it to?
 * here are the paths
 * /usr/local/pem/vhosts/238001/webspace/siteapps/WordPress-52841/htdocs
 * /usr/local/pem/vhosts/238001/webspace/siteapps/WordPress-52841/htdocs
 * Here is some of the code in timthumb where I think it should go:
 *     ```
       protected function calcDocRoot(){
       		$docRoot = @$_SERVER['DOCUMENT_ROOT'];
       		if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
       			$docRoot = LOCAL_FILE_BASE_DIRECTORY;
       		}
       		if(!isset($docRoot)){
       			$this->debug(3, "DOCUMENT_ROOT is not set. This is probably windows. Starting search 1.");
       			if(isset($_SERVER['SCRIPT_FILENAME'])){
       				$docRoot = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
       				$this->debug(3, "Generated docRoot using SCRIPT_FILENAME and PHP_SELF as: $docRoot");
       ```
   
 * This is in my host company FAQ about where to add the paths:
 *     ```
       define ('LOCAL_FILE_BASE_DIRECTORY', '/usr/local/pem/vhosts/$WEBSPACE/webspace/siteapps/$SITEAPPID/htdocs');
       $_SERVER['DOCUMENT_ROOT'] = '/usr/local/pem/vhosts/$WEBSPACE/webspace/siteapps/$SITEAPPID/htdocs';
       ```
   
 * I am new to this and currently very confused – can anyone help 🙂
 * Regards
 * Tony
 * [http://wordpress.org/extend/plugins/timthumb/](http://wordpress.org/extend/plugins/timthumb/)

The topic ‘Timthumb – Paths’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/timthumb.svg)
 * [timthumb](https://wordpress.org/plugins/timthumb/)
 * [Support Threads](https://wordpress.org/support/plugin/timthumb/)
 * [Active Topics](https://wordpress.org/support/plugin/timthumb/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/timthumb/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/timthumb/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [SlashMiester](https://wordpress.org/support/users/slashmiester/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/timthumb-paths/)
 * Status: not resolved