Forums

timthumb.php thumbnails not displaying (3 posts)

  1. dangadd5600
    Member
    Posted 1 year ago #

    I'm trying to run this timthumb resizing script:

    http://d35yk3eosgccov.cloudfront.net/wp-content/themes/thedawn/lib/scripts/resize/timthumb1.php?src=http://inthenameofgadd.com/wp-content/uploads/2011/04/tg_portfolio.jpg&w=296&h=150&zc=1

    The php file is accessible, the image that it is trying to resize is accessible, and a resized image is even being generated and cached on both my web server and the corresponding folder on my CDN: http://inthenameofgadd.com/wp-content/themes/thedawn/lib/scripts/cache/193dc0f2c02d80b0f14c092ec6c9957a.jpg

    However, I can't get it to display on the site. I realize that I am trying to run a script that is located on my CDN for an image on my web server, and timthumb.php sets 'ALLOW_EXTERNAL' to false, but it also has an '$allowedSites' array, and I have added my domain to that. I've seen with previous php scripts that godaddy has issues with 'mime_type', but in researching this issue, that does not seem the be the problem in this case, at least I don't think it is.

    Anyone have any ideas?

  2. yoav.aner
    Member
    Posted 11 months ago #

    I think that cloudfront filters the parameters from dynamic scripts, so it doesn't actually pass the ?src=... parameters to your server to fetch the image and cache it.

    I managed to find a solution to this by using .htaccess rewrite rules to effectively change the url so it gets processed by cloudfront.

    You can read about it on http://blog.gingerlime.com/thumbs-up

  3. derekroscoe
    Member
    Posted 6 months ago #

    I, too, had this same problem.

    A solution that worked for me was to install all the WP-core files in its own subdirectory; while placing copies of the index.php, .htaccess and error_log files in the root directory as allowed by WP.

    This also helps with better hiding your admin access page from the world. I was also able to keep all my original mod_security settings where they need to be.

    See this link for better instructions, which can be found under the settings tab once WP is installed:

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

Topic Closed

This topic has been closed to new replies.

About this Topic