I'm testing a WordPress plugin that uses TimThumb.
On one server (GoDaddy) I'm getting a 400 (Bad Request) error whenever I request the timthumb.php file from the plugins directory. However, an identical request on a different server works just fine.
/wp-content/plugins/wp-vimeo/timthumb.php
I'm puzzled. I can request other files in the same directory just fine. Could it be a permissions issue? I would have expected a 403 if that were th开发者_运维百科e case.
For Windows hosting add IUSR (or whatever account your app pool is running) to wp-content with read/write.
For me it was because my images were to be resized. If you copy paste the timthumb url int the browser and receive the error that the image size is to big. I had to either change the file size of the images or change the timthumb's setting to handle bigger images.
This line in the timthumb.php file:
define ('MAX_FILE_SIZE', 3000000); // file size limit to prevent possible DOS attacks (roughly 3 megabytes)
I fixed it by moving my site from a Window Server
to a Linux Server
. Still on godaddy. [a]
Inside timthumb.php you'll find this line:
header ($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
This is triggered whenever there's an error: inaccessible cache, required query string variables missing, etc. I have found that link checkers like Google Webmaster Tools and Integrity sometimes remove the query string and check the validity of the root files. Of course without the query string timthumb.php will then return the 400 error.
To tidy this up I comment out the above line.
These answers don't seem to address the issue directly. You can paste the URL in of the timthumb call. In your browser you should get diagnostic error form timthumb. Usually it is because there is not a writable cache directory for timthumb to use to make the Image it serves.
精彩评论