Results 1 to 5 of 5

Thread: TimThumb PHP Image Resizer and Cache Question

  1. #1
    Join Date
    Oct 2012
    Posts
    151
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default TimThumb PHP Image Resizer and Cache Question

    I am using TimThumb PHP Image Resizer: http://www.binarymoon.co.uk/projects/timthumb/ in one of my projects and I just noticed that my cache folder is full of files that have one line of php code in them: <?php die('Execution denied!'); //jpg ?>

    Everything is working just fine, but every time an image is posted and viewed or just viewed a new cache file appears for that image.

    Question: Is it normal?

    I know cache is cleaned regularly, but I am wondering if it's going to create an issue if I have thousands of those files cached day in and day out.


    Thanks!

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,947
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    if you Google "timthumb execution denied" you'll find suitable information and fixes.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Oct 2012
    Posts
    151
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by Beverleyh View Post
    if you Google "timthumb execution denied" you'll find suitable information and fixes.
    I don't know why I didn't think of that. It looks like the <?php die('Execution denied!'); //jpg ?> was designed as a security feature. Ok, settled that one down.

    The question I still need to get answered is: is having thousands of cached files going to create an issue for a server? Or is it typical and normal?

    Can't find an answer to that one on my own.

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,947
    Thanks
    16
    Thanked 304 Times in 303 Posts
    Blog Entries
    11

    Default

    If the cache is being emptied by the script at regular intervals, I don't imagine so. I haven't used this particular script, but I've used text replacement scripts in the past and they auto-generated images on the server in a similar fashion. The cache used to get pretty crowded but it cleansed itself every week and having the images sat there caused no harm. Once they'd been generated, they were just files like any other - of course, the auto-generation part is where the slow-down happened as the server worked harder, so there was a bit of a delay in the time it took for the replacement images to appear on the web page. But then as you'd expect, subsequent views would pull them from the cache so it would be faster.

    If you want a bit of reassurance though , its probably going to be easier to ask the developer directly.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  5. #5
    Join Date
    Oct 2012
    Posts
    151
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default

    Thank you. This morning I researched more reg. the script. All the answers are in the script. It's smarter than I thought it was. It appears the cache will be automatically cleaned every so often.

Similar Threads

  1. TimThumb not working on my WP site
    By rususorinvick in forum PHP
    Replies: 2
    Last Post: 06-27-2012, 10:24 PM
  2. Image resizer script - only works in IE
    By techno_race in forum JavaScript
    Replies: 0
    Last Post: 03-14-2010, 03:08 AM
  3. Cache only image
    By amitshah.in in forum PHP
    Replies: 0
    Last Post: 09-18-2009, 05:26 AM
  4. PHP Image Resizer
    By mada9369 in forum PHP
    Replies: 2
    Last Post: 01-04-2009, 09:32 PM
  5. Replies: 1
    Last Post: 08-03-2007, 01:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •