Subdomain & Timthumb Issue (11 posts)

  1. Gutterflower
    Posted 2 years ago #

    Hi guys.
    I am having an issue with thumbnails on a multisite install and its driving me a little mad :S
    I know lots of people have issues with timthumb and multisites with domain mapping but I've been told this particular theme has been tested on multisite and there is not any special configuration required to make it work. It was also suggested that the issue could be something to do with the document_route set up.

    Ok so the site is set up at

    domain mapped to it.

    Now my problem is as below. Take this page


    The Thumbnail on the left doesn't work. By copying the URL of the image I get this error.


    The image location mentioned in that error is correct at.


    Buy it seems not to be contacting timthumb properly. I assume it is a hosting problem with the subdomain then? I use blue host and from what I can tell its set up how it should be using a wild card


    I already have another site at
    http://vhcoasters.com domain mapped to http://vhcoasters.shimmeringhorizons.com without a problem.

    Am I missing something tiny here? I must admit I am fairly new to all this but I thought I had a handle on all of this until this issue.

    Thanks in advance for any advise.


  2. http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/ is the best explanation of why this happens and how to fix it that I know of.

  3. Gutterflower
    Posted 2 years ago #

    Hi thanks for the reply.
    Much appreciate. Must be frustrating getting this question over and over again from new guys

    I've seen that page before and it didn't help I'm afraid. It actually knows where the image is. The image file in the error below is correct and its there. It has the right blog id and path.

    The website encountered an error while retrieving http://thethemeparkdirectory.com/wp-content/themes/directory/tn.php?src=http%3A%2F%2Ftpdb.shimmeringhorizons.com%2Fwp-content%2Fuploads%2Fsites%2F6%2F2013%2F08%2FPaultonslogo.jpg&w=140&h=200. It may be down for maintenance or configured incorrectly.

    Here's a direct link to it

    Placing the code from binarymoon into functions.php doesn't do anything no matter what blog id or path I put I still get the same error. something I noticed was that the code on binary moon seems to think images should be in the blogs-dir directory

    /wp-content/blogs.dir/’ . $blog_id . ‘/files/’ . $imageParts[1];

    Mine are not and are in the

    /wp-content/uploads/sites/’ . $blog_id . $imageParts[1];

    It seems to me to be the http://thethemeparkdirectory.com/wp-content/themes/directory/tn.php address which is wrong not the image source.

    Its entirely possible I'm not understanding something fundamental here. Sorry if thats the case.


  4. Well that doc was written back when everyone did have it in blogs.dir

    Yours would be /wp-content/uploads/sites/’ . $blog_id . $imageParts[1]; since you started WP on 3.5 or later. (Yes, it matters, I wish we had gotten it right from the start....)

    http://thethemeparkdirectory.com/wp-content/uploads/sites/6/2013/08/Paultonslogo.jpg works, so domain mapping is good.

    http://thethemeparkdirectory.com/wp-content/themes/directory/tn.php is the TimThumb file, and it's supposed to parse the image. What version of TimThumb does it claim to be? You can open it up in a file editor.

  5. Gutterflower
    Posted 2 years ago #

    It's version 2.8.11 according to the actual timthumb.php

    The tn.php actually just redirects to the timthum.php with this code

    Just shortcut for timthumb.php
    In templates use macro {timthumb src => ..., w => ..., h => ...}
    require_once dirname(__FILE__) . '/AIT/Framework/Libs/timthumb/timthumb.php';
  6. *MRPHF* WHHHHYYYYYY do people do that? *sigh*

    Well I have no idea why that theme is doing that. You're going to have to ask that theme dev what's up with this and if it's supported on Multisite. Some themes are just not written 'right' so they can't work on Multisite, due to the moved content dir. The plugins should use wp_upload_dir() to dynamically address the issue :/

  7. Gutterflower
    Posted 2 years ago #

    haha I have no idea why they do it.

    I have contacted the devs but their support is appalling. I'm lucky to get a response within a week. The last one being

    Theme is tested on multisite and there is not required any special configuration to make it work, we have tested classic configuration with sites on subdomain and subfolders, where timthumb have not problem access source images...
    On some servers was problem that there was not set up correct DOCUMENT_ROOT for each one of used domains. When timthumb get source images, use document root to get image correct way to image on server.

    Thanks, Ivan.

    Which wasn't much help I'm afraid. Still waiting for a response to my response to that.

    Oh well thanks for giving it a go. I'll keep trying fixes till one takes.

  8. Gutterflower
    Posted 2 years ago #

    grrr this is stupid. It DID work fine without Domain mapping. Now it doesn't.

    Just switched off domain mapping. this is the same page.


  9. I had a subdirectory-based multisite that I inherited and had to upgrade a few times. Images were giving me hell. I started over with a fresh install, 3.5.2, but still had trouble. What finally helped me was specifying explicitly the file uploads path and the uploads url, as in: wp-content/blogs.dir/6/files and http://tpdb.shimmeringhorizons.com/files. Since you are using subdomains, and I'm interpreting your data, it may not be correct, but probably worth a shot.

  10. It DID work fine without Domain mapping. Now it doesn't.

    Well that's interesting... Did your server have any upgrades?

Topic Closed

This topic has been closed to new replies.

About this Topic