?
Solved

Document Root Problems with timthumb.php within Wordpress

Posted on 2011-10-26
10
Medium Priority
?
1,106 Views
Last Modified: 2012-05-12
Dear experts ,

I am stuck with the following problem and your help would be most welcome.
I am using the latest version of timthumb.php found here : http://timthumb.googlecode.com/svn/trunk/timthumb.php

I am calling timthumb.php using this as a test:

http://www.example.co.uk/wp-content/themes/TheTheme/timthumb.php?src=http://www.example.co.uk/wp-content/uploads/2010/12/iStock_3Medium.jpg&h=184&w=184&zc=1&q=90

or

http://www.example.co.uk/wp-content/themes/TheTheme/timthumb.php?src=http://www.example.co.uk/wp-content/uploads/2010/12/iStock_3Medium.jpg

and in both cases I get

A TimThumb error has occured

The following error(s) occured:
Could not find the internal image you specified.


I understand that the problem is related to the document root variable, but I may be completely wrong.

Using the following small script which i ran in the same folder as timthumb.php i determined the document root

<?php
 //Gets the document root
 $root = getenv("DOCUMENT_ROOT") ;
 Echo $root;
 ?>

The answer was

/kXXXXXX/homepages/xx/nnnnnnnnnnn/htdocs/site2010

I tried adding

$_SERVER['DOCUMENT_ROOT'] = '/kXXXXXX/homepages/xx/nnnnnnnnnnn/htdocs/site2010';

at the top of the php file and still got the same error. For anybody who is familiar you may want to know that it is hosted on 1and1 and that it is shared hosting with no root access.

Any ideas ?


Thanks in advance.
0
Comment
Question by:akajohn
  • 5
  • 4
10 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37030338
Sure would be helpful if we had the actual URL and a link to phpinfo()...
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37031123
What is freegametoipia.com and what is it downloading on to my computer?  
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37031151
When I visit the URL problem, I get this.  Is that what you are seeing? screen-capture fragment
0
 
LVL 6

Author Comment

by:akajohn
ID: 37031160

Do not visit any of the links if redirected. I cleaned the website from an infection according to   http://magstags.com/wordpress-seo/phpremoteview-hack-superpuperdomaincom-remove/
The website was infected due to a vulnerability in timthumb.php and now I got problems (document root) with the new clean version.

If you get a link freegametoipia.com can you please tell me how you got it as I  want to clean the website completely.(Any tips on that most welcome but I can open another question for that).


http://www.matthewswing.co.uk/wp-content/themes/TheProfessional/timthumb.php?src=http://www.matthewswing.co.uk/wp-content/uploads/2010/12/iStock_000007042793Medium.jpg&h=184&w=184&zc=1&q=90

is free from any infection.

A.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37031187
I would not know how to clean it, sorry.  I did not get a link - it just looked like it was running a JavaScript application that was listening for something.  I'm just planning on deleting my cookies.

The image at the most recent link appears to have a GIF header, but invalid content.  Not sure what to make of that.
0
 
LVL 6

Author Comment

by:akajohn
ID: 37031229
If I visit the URL directly i get the hotlinking image which is the behaviour desired. (I am turning it off for testing)
But if you visit the contact us page (http://www.matthewswing.co.uk/contact-us/
) and then view the source you should find the link:

http://www.matthewswing.co.uk/wp-content/themes/TheProfessional/timthumb.php?src=http://www.matthewswing.co.uk/wp-content/uploads/2010/12/iStock_000007042793Medium.jpg&h=184&w=184&zc=1&q=90

and if you click on it it gives you the error text above. " A Tin Thumb error has .....)

0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 1500 total points
ID: 37034619
Rather than trying to fix the error, you should download the latest version of The Professional from Elegant Themes and just replace the old theme with the current one.  That should fix all the timthumb related issues.
0
 
LVL 6

Author Closing Comment

by:akajohn
ID: 37130514
Thx for the advice. Upgraded and cleaned everything.

A>
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
Suggested Courses
Course of the Month17 days, 4 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question