Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Ajay

    (@ajay)

    I’m not sure of the exact reason, but I’ve searched the web for some possible solutions to this:

    1. Check permissions on your cache directory in the timthumb folder. Should be writable by the script so either 755 or 777

    2. https://www.yunomie.com/2438/timthumb-lock-for-writing-error/

    Thread Starter bjaspray

    (@bjaspray)

    Thanks for looking into this for me. I’m afraid the above doesn’t seem to have worked. I’m looking into reasons the php command flock() may fail but I haven’t found anything yet. I’ll keep investigating but if you think of any other possible reasons then please let me know.

    Plugin Author Ajay

    (@ajay)

    Is it possible to ask your host if there are any permission related issues in the use of this command?

    Do you have any other plugin / theme that you know uses timthumb?

    Thread Starter bjaspray

    (@bjaspray)

    I asked my server host about it and he asked for permission to edit timthumb.php, whereupon he confidently commented out the flock() command and its catch statements and informed me that timthumb now worked. (I just found this out by doing a diff on the files)

    I’m not sure what to make of this. I assume he’s saying that you don’t really need to lock the image before editing it, but in my mind that doesn’t count as a solution. What I wanted him to do was make flock() work or explain why it didn’t work.

    But for now, timthumb does appear to be working.

    Plugin Author Ajay

    (@ajay)

    I agree with you on flock needing to work. Is there a reason he says that he commented out flock()?

    The issue is you’ll need to keep replicating this everytime you update this plugin or any other plugin / theme that uses timthumb or maybe wider if it uses flock()

    Thread Starter bjaspray

    (@bjaspray)

    I’ve asked him about this and I’ll let you know what he says.

    Thread Starter bjaspray

    (@bjaspray)

    He says we just can’t use the flock() function on our server. Pretty annoying!

    Plugin Author Ajay

    (@ajay)

    Unfortunately, you’ll be stuck on that one as long as you host with them.

    The way timthumb is activated in the plugin is on line 625

    https://plugins.trac.www.ads-software.com/browser/contextual-related-posts/trunk/contextual-related-posts.php#L625

    I’m not sure how familiar you are with PHP, but you could potentially

    1. Create your own flock() free timthumb.php or any other thumbnailing script

    2. Remove the existing filter:

    remove_filter('crp_postimage', 'crp_scale_thumbs');

    3. Write your own function in your themes function.php along those from line 625

    I had a very similar issue to this, it was related to the group/owner and permissions set on the timthumb folder, not related to flock(). I changed the folder owner to one with more privileges and this solved the problem for me.

    Hope that helps anyone else having similar issues in future.

    Plugin Author Ajay

    (@ajay)

    Thank you Kiseki for the update ??

    hmmm… I’m having the same lock issue.

    However, when I first added the plugin, it worked fine, but then after a few days, some images didn’t show up (but some did; probably because they were cached). Here’s one page:

    https://www.popsirens.com/listen-katy-perrys-2nd-single-prism-unconditionally/

    So does that point to the issue with folder permissions, or is it something else?

    Plugin Author Ajay

    (@ajay)

    Silvanovicz, I can see all the images in your “You may also like” section

    I’ve decided to turn TinThumb off, seeing as it was picking a size that was quite close anyway.

    Plugin Author Ajay

    (@ajay)

    I understand. Unfortunately, it’s most likely a permission issue with flock

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘timthumb not working at all’ is closed to new replies.