WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Wrong path by timthumb after moving website - plz help! (13 posts)

  1. r00ki3
    Member
    Posted 2 years ago #

    So...I'm having a problem.
    I'm trying to get a customized version of Sky theme to work. Everything is working fine, all functionality seems to work...but after moving it from a test domain A to a live environment domain B problems start to occur.

    In a gallery page my site doesn't show the featured image thumbnails anymore. It seems to be a timthumb problem generating an incorrect path/url. The test environment came up with "www.domaina.com/path/img.jpg"
    The live environment comes up with /home/vhosting/h/vhostxxx/domains/livedomain.com/htdocs/www/path/img.jpg.

    Now I'd like to change the path but I can't find out how!
    The php stuff generating this thing is:
    <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, 'portfolio'); ?>

    I'm wondering where and how I can change the url generated by ["use_timthumb"]
    I don't have a thimthump.php file in my theme or on my server, so I'm confused where the theme is getting the instructions from...where the hack is ["use_timthumb"] and how can I change it?

    Any help/directions are appreciated!

  2. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    Please post a url.

  3. r00ki3
    Member
    Posted 2 years ago #

    Another draft version is accessible on the following location

    http://www.martinstruik.nl/wilcovannoppen

    So far I've tried:
    CHMOD 777 upload location
    using ['fullpath'] instead of ["use_timthumb"]
    Moved to another server, clean db install

    It seems to me there's a very simple solution to this in generating the right path, but I can't figure out how...

    Thanks for your help!

  4. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    That link is a maintenance link. I meant to the site itself.

    You should always use absolute urls with wordpress.

  5. r00ki3
    Member
    Posted 2 years ago #

    It is indeed...but this shouldn't affect the problem solving I'm trying to do. It runs in an exact same environment, exact same setup and is having the exact same problems...

    It's about the incorrect path being generated
    Instead of /home/vhosting/b/vhostxxx/domains/domain.nl/htdocs/www/folder//wp-content/uploads/2011/11/haven-veere-2-369376_207x136.jpg

    it should read something along the lines of:
    http://www.domain.nl/folder/image.jpg

    That's what I'm trying to solve.

  6. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    It is indeed...but this shouldn't affect the problem solving I'm trying to do.

    But it affects the problem solving I am trying to do. There are no images to look at, so no urls. There is no source code to show plugins, scripts, validation, etc. Since debugging is a process of elimination, we often ask for an active url but if that is not possible we break out the crystal balls. :^)

    it should read something along the lines of:
    http://www.domain.nl/folder/image.jpg

    WordPress default would be http://www.site/wp-content/uploads/2103/03/image.jpg

    Did you check the plugins for timthumb?

    And under dashboard, settings, media, check what is there for uploading files.

  7. r00ki3
    Member
    Posted 2 years ago #

    Thanks for checking, much appreciated.
    No timthumb call was found in plugins.
    under dashboard, settings, media is the url default (empty).
    I've tried changing this but it didn't affect the url generation.

    About the source code, images, scripts etc. it is viewable...even a right-mouse-click should show you the source and eventually also the (broken) links to images etc. the rest is working fine.

    It's just that one url generation stuff what I can't get to work.

  8. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    About the source code, images, scripts etc. it is viewable

    The source code showing images is not visible here,
    http://www.martinstruik.nl/wilcovannoppen at this time. As long as you are putting up a maintenance page the only code available will be of that page.

    But never mind. I wanted to look at the code for debugging purposes. Sorry I can't help.

  9. r00ki3
    Member
    Posted 2 years ago #

    Right...I'm sorry...I see what you mean. Accidentally the "under construction" page was still active for other IP adresses...

    My bad. It should be available now.

  10. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    Have you tried:
    - deactivating all plugins (yes, all) to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s). Don't forget the ones in mu-plugins. If you can't get into your admin dashboard, try resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.
    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

  11. r00ki3
    Member
    Posted 2 years ago #

    Thanks, deactivating plugins, resetting plugins and switching to other themes didn't solve it.

    Originally in themes that use a timthumb sort of script the following code can be found:

    unction get_document_root ($src) {
    
        // check for unix servers
        if (file_exists ($_SERVER['DOCUMENT_ROOT'] . '/' . $src)) {
            return $_SERVER['DOCUMENT_ROOT'];
        }
    
        // check from script filename (to get all directories to timthumb location)
        $parts = array_diff (explode ('/', $_SERVER['SCRIPT_FILENAME']), explode ('/', $_SERVER['DOCUMENT_ROOT']));
    
    	$path = $_SERVER['DOCUMENT_ROOT'];

    It's my opinion that somewhere I have to define the right path. What I'll do next is scan all possible files on the server for this sort of script.

  12. stardazzled
    Member
    Posted 2 years ago #

    Hi,
    I have similar problem.

    For example for the second post:-
    In Custom Fields my thumbnail pointing path is:
    /home/stardaz/public_html//wp-content/uploads/2012/08/Carat-Cheung31-e1346216809467.jpg

    but when I check it with source code (Crtl+U for Firefox) it appear as:
    /home/stardaz/public_html//wp-content/uploads/2012/08/Carat-Cheung31-e1346216809467-43574_222x180.jpg

    May I know why it's different from my pointing path in Custom Fields?

    I already deactivate all the plugins to check 1 by 1 but the problem still there.

    My blog is http://stardazzled.net

  13. sonit
    Member
    Posted 1 year ago #

    need to set permission of folder /wp-content/uploads to 777 ( you can set permision all files and subfolder of uploads folder by FileZilla tool)
    your issue the same with the last my issue. when I set the persion so it is ok now

Topic Closed

This topic has been closed to new replies.

About this Topic