Support » Plugin: timthumb » 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



    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')) {
    			$this->debug(3, "DOCUMENT_ROOT is not set. This is probably windows. Starting search 1.");
    				$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 🙂



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