{"id":3828952,"date":"2013-06-10T13:26:58","date_gmt":"2013-06-10T13:26:58","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/timthumb-paths\/"},"modified":"2016-08-21T01:52:19","modified_gmt":"2016-08-21T01:52:19","slug":"timthumb-paths","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/timthumb-paths\/","title":{"rendered":"Timthumb &#8211; Paths"},"content":{"rendered":"<p>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.<\/p>\n<p>My question is which line do i add it to?<\/p>\n<p>here are the paths<\/p>\n<p>\/usr\/local\/pem\/vhosts\/238001\/webspace\/siteapps\/WordPress-52841\/htdocs<\/p>\n<p>\/usr\/local\/pem\/vhosts\/238001\/webspace\/siteapps\/WordPress-52841\/htdocs<\/p>\n<p>Here is some of the code in timthumb where I think it should go:<\/p>\n<pre><code>protected function calcDocRoot(){\n\t\t$docRoot = @$_SERVER[&#039;DOCUMENT_ROOT&#039;];\n\t\tif (defined(&#039;LOCAL_FILE_BASE_DIRECTORY&#039;)) {\n\t\t\t$docRoot = LOCAL_FILE_BASE_DIRECTORY;\n\t\t}\n\t\tif(!isset($docRoot)){\n\t\t\t$this-&gt;debug(3, &quot;DOCUMENT_ROOT is not set. This is probably windows. Starting search 1.&quot;);\n\t\t\tif(isset($_SERVER[&#039;SCRIPT_FILENAME&#039;])){\n\t\t\t\t$docRoot = str_replace( &#039;\\\\&#039;, &#039;\/&#039;, substr($_SERVER[&#039;SCRIPT_FILENAME&#039;], 0, 0-strlen($_SERVER[&#039;PHP_SELF&#039;])));\n\t\t\t\t$this-&gt;debug(3, &quot;Generated docRoot using SCRIPT_FILENAME and PHP_SELF as: $docRoot&quot;);<\/code><\/pre>\n<p>This is in my host company FAQ about where to add the paths:<\/p>\n<pre><code>define (&#039;LOCAL_FILE_BASE_DIRECTORY&#039;, &#039;\/usr\/local\/pem\/vhosts\/$WEBSPACE\/webspace\/siteapps\/$SITEAPPID\/htdocs&#039;);\n$_SERVER[&#039;DOCUMENT_ROOT&#039;] = &#039;\/usr\/local\/pem\/vhosts\/$WEBSPACE\/webspace\/siteapps\/$SITEAPPID\/htdocs&#039;;<\/code><\/pre>\n<p>I am new to this and currently very confused &#8211; can anyone help \ud83d\ude42<\/p>\n<p>Regards<\/p>\n<p>Tony<\/p>\n<p>https:\/\/wordpress.org\/extend\/plugins\/timthumb\/<\/p>\n","protected":false},"template":"","class_list":["post-3828952","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3828952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3828952\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3828952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}