oseawey / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

timthumb.php on line 607 (loads of warnings) #188

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Am getting alot of "warnings" in apache logs 

[Wed May 18 13:29:57 2011] [warn] [client 173.245.53.125] mod_fcgid: stderr: 
PHP Notice:  Undefined index: extension in 
/home/******/public_html/booru/timthumb.php on line 607, referer: 
http://*******.com/image.php

image.php is this 
http://pastebin.com/Zp2A1UL0
It is pulling a few images from a datebase and timthumb is thumbnailing them

and this is timthumb.php
http://pastebin.com/JGdmKXFm

Thanks

Original issue reported on code.google.com by Vodkahol...@gmail.com on 18 May 2011 at 11:36

GoogleCodeExporter commented 9 years ago
Looks like an issue on line 602 with the pathinfo() function from PHP.
If your image filenames don't have extensions, then the variable timThumb is 
trying to use is the wrong one.
http://uk.php.net/manual/en/function.pathinfo.php#76433

Your code appears to be using /images/ha/hash as the image path which may not 
have an extension.
Try changing line 602:
// $local_filepath = DIRECTORY_CACHE . '/' . $filename . '.' . strtolower 
($fileDetails['extension']);
$local_filepath = DIRECTORY_CACHE . '/' . $filename . '.' . strtolower 
($fileDetails['filename']);

As a temporary fix.
Hope this helps,
Thanks,
William

Original comment by wp.came...@gmail.com on 24 May 2011 at 10:48

GoogleCodeExporter commented 9 years ago
this should be fixed in the current version

Original comment by BinaryMoon on 10 Jun 2011 at 6:23

GoogleCodeExporter commented 9 years ago
Hi very sorry William only just got the email (and I forgot /bows)
I made the change and still get this msg "alot" in the logs

Undefined variable: local_filepath in 
/home/****/domains/cosplays.animelon.com/public_html/timthumb.php on line 604

The url has change from last time

http://pastebin.com/wbqRu87y

Original comment by Vodkahol...@gmail.com on 10 Jun 2011 at 11:13