Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • jeffw

Support for: Unite – WordPress Business, Magazine Theme

Unite (WordPress)

Public Group  |  active 4 years, 4 months ago ago
Viewing post 1 to 8 (8 total posts)

TimThumb image resizing is not working

  • zagued

    said

    I have freshly installed Unite theme on my Wordpress blog: http://www.bestcarrental.com.au/blog
    > Any images displayed through timthumb.php do NOT work.

    The URL I enter in the admin blog post form for Main Image is http://www.bestcarrental.com.au/blog/wp-content/uploads/2013/07/cradle-mountain-dove-lake.jpg, which is a valid URL. And we can notice the timthumb problem there:

    http://www.bestcarrental.com.au/blog/wp-content/themes/parallelus-unite/includes/timthumb.php?src=/blog/wp-content/uploads/2013/07/cradle-mountain-dove-lake.jpg&w=556&h=133&zc=1

    I have downloaded the latest version of timthumb (v.2.8.11) and get the same result.
    I have changed the permission to timthumb.php and to the cache directory. But it doesn’t seem to be an execution issue.

    As a matter of fact, when I change the src value to the absolute path, timthumb works fine:

    http://www.bestcarrental.com.au/blog/wp-content/themes/parallelus-unite/includes/timthumb.php?src=http://www.bestcarrental.com.au/blog/wp-content/uploads/2013/07/cradle-mountain-dove-lake.jpg&w=556&h=133&zc=1

    For some reasons, it seems that the relative path is not working with TimThumb.

    Is it because my blog URL is http://www.bestcarrental.com.au/blog and not simply a domain name?

    Is there a way to make timthumb processing absolute path instead of relative path?

    Thank you for your help!

  • zagued

    said

    [UPDATE] Actually it doesn’t work with absolute path either. It was only working because I made some changes in the timthumb.php source file:


    [line 33] if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES', TRUE);  
    [line 212] //$this->src = preg_replace('/https?://(?:www.)?' . $this->myHost . '/i', '', $this->src);
    [line 825] $docRoot = dirname(__FILE__);

    As the resulting HTML code is using a relative path, it doesn’t work. I reverted it to the original source code.

  • jeffw

    said

    Hi, zagued.

    If you open your browser’s error/javascript console you will see that your server is responding with 400 Bad Request wherever the timthumb.php script is trying to display a thumbnail. If you search this forum for “timthumb 400 bad request” you will find more information about this and also some tips on how to resolve the issue.

  • zagued

    said

    Hi Jeff,

    I have tried all the possible combinations of permissions. CHMOD 755 to all directories and CHMOD 644 to timthumb.php. Or even CHMOD 777 every where. Always the same result.

    You apparently suggest that the issue is a TimThumb/server side problem. Well, the guys from Wordpress suggest the issue is a theme problem (see there: http://wordpress.org/support/topic/timthumb-not-working-with-relative-path-v2811?replies=3).

    In both cases, I still have the problem :(

  • jeffw

    said

    Hi, zagued.

    There is no issue with the theme here. We have sold more than 5,000 copies of this theme and just a relative handful of customers have had a problem with TimThumb and server permissions.

    Unfortunately I can’t tell you anything more about the issue than you can find in this forum by searching for “timthumb 400 bad request”.

    Remember that the Unite theme is more than three years old, that’s why it uses TimThumb. Back in those days WordPress had no support for generating thumbnails so theme authors had to resort to other methods. You can tell that to your opinionated friend in the WordPress forum.

  • zagued

    said

    That’s interesting… It really looks like the problem comes from the fact that the wordpress URL is not just a domain name but a domain name /blog/.

    I’ve made 2 fresh WordPress 3.6 installs with the latest version of Parallelus Unite. Same file owner. Same file permissions. They are identical:

    > http://www.zagit.com.au

    > http://www.bestcarrental.com.au/blog/

    The first one works perfectly fine. The second one doesn’t work.

    Is it TimThumb that doesn’t work properly or Unite that doesn’t invoke TimThumb the right way?

    I’m more and more confused.

  • jeffw

    said

    We have sold more than 10,000 copies of themes that use TimThumb and fewer than 0.05% of customers have had a problem with TimThumb and server permissions. That is a fact.

    The issue is not with the Unite theme. Do you really think that we could sell more than 10,000 copies of themes that didn’t work?

    Honesty, I can’t tell you anything more about the issue than you can find in this forum by searching for “timthumb 400 bad request”.

    I’m sorry to keep saying that, but it is the truth. Every single bit of knowledge that I have about this issue has already been posted in this forum at least once and you can find them all by searching this forum for “timthumb 400 bad request”.

    I can’t help any further with this issue.

    If you want to talk shop I will ask @andy to take over from me in this topic because just typing the word TimThumb raises my blood pressure to dangerous levels.

  • zagued

    said

    The answer from TimThumb is:

    The path to your timthumb,php file is this.

    http://www.bestcarrental.com.au/blog/wp-content/themes/parallelus-unite/includes/timthumb.php

    That makes it part of your theme and as mentioned above that’s not supported here.

    I don’t know why that theme feature would work on one installation and not the other. There may be some dependency that is missing on the second installation. The best place to find out what the problem with that theme remains with the theme author.

Viewing post 1 to 8 (8 total posts)
Topic tags: display, image resize, relative path, theme, timthumb, unite