WordPress.org

Ready to get started?Download WordPress

Forums

timthumb
Timthumb - Paths (1 post)

  1. SlashMiester
    Member
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags