0

Hi all please view this link below

http://petseden.net/?wpsc-product=dasdadsa

to those who are familar with php, when I used chrome and inspected the element, it seems that the thumbnail is not generated. Any idea why? I checked online, the cache and the script is chmod 755 and php_gd2.dll is installed. I have tried figuring this over a few days and checked online but to no avail.

Please help.

[edit] also, it might be helpful to know that when I tested the script locally on WAMP server, it works perfectly.

  • Where is the code failing? Do you have any logs? – David Grant Oct 02 '12 at 10:58
  • hi david thanks for the prompt reply. The code is not failing locally, and no I don't know of any methods to get the logs. the only thing i saw was Failed to load resource: the server responded with a status of 500 (Internal Server Error) – Rui He Zhengrui Oct 02 '12 at 10:59
  • It looks as though WordPress `mod_rewrite` rules are causing a problem. Visiting the actual `TimThumb` links, here's what you get: http://petseden.net/wp-content/themes/mio/sp-framework/timthumb/timthumb.php/?src=http://petseden.net/wp-content/uploads/2012/10/Humpback-Whale.jpg&h=500&w=500&zc=1&q=90&a=c&s=&f=&cc=&ct= – BenM Oct 02 '12 at 10:59
  • yes you are absolutely right! may I know how to solve that problem ? – Rui He Zhengrui Oct 02 '12 at 11:00

1 Answers1

1

It looks as though WordPress mod_rewrite rules are causing a problem. Visiting the actual TimThumb links, here's what you get.

You need to add an additional rule into .htaccess to prevent the redirect occurring on the TimThumb script:

RewriteRule ^/wp-content/themes/mio/sp-framework/timthumb - [L]

You need to place this ahead of the WP rewrites.

BenM
  • 52,573
  • 26
  • 113
  • 168
  • hmm i had a internal server error instead.. I did modify the .htaccess .. it is "# BEGIN WordPress RewriteRule ^/wp-content/themes/mio/sp-framework/timthumb # END WordPress " – Rui He Zhengrui Oct 02 '12 at 11:22
  • Looks like you've missed off the `- [L]`. – BenM Oct 02 '12 at 11:23
  • okay now that I have done it, it seems that the error is still there when i go to the image url, thank you so much for your help, do you have any other alternatives? – Rui He Zhengrui Oct 02 '12 at 11:28
  • Without seeing your full `.htaccess`, there's very little I can do I'm afraid. – BenM Oct 02 '12 at 11:29
  • okay my full .htaccess is simply less than 5 lines ******* # BEGIN WordPress RewriteRule ^/wp-content/themes/mio/sp-framework/timthumb - [L] # END WordPress ********** – Rui He Zhengrui Oct 02 '12 at 11:31
  • You're editing the wrong `.htaccess`. Try the one in the root install dir of WP. – BenM Oct 02 '12 at 11:31
  • hmm okay I believe I left out a few details.. I have a folder called www.petseden.net inside another installation of wordpress under hungrypets.com.sg, so I should edit the .htaccess of hungrypets.com.sg? from what I know, when I visit petseden.net, it will redirect to the petseden.net folder. I'm confused, which .htaccess should I edit? thank you for your patience! – Rui He Zhengrui Oct 02 '12 at 11:38
  • Whichever contains the rewrites for your WP install :) – BenM Oct 02 '12 at 11:42
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/17447/discussion-between-rui-he-zhengrui-and-benm) – Rui He Zhengrui Oct 02 '12 at 11:59