ferenznetworks / timthumb

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

Header modification error. #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello. 

I've been working with thumb.php for www.threesheetsnorthwest.com on WPMU
2.8.4a. 

I've succeeded in getting the images to display properly on the site by
following the directions here: http://forum.woothemes.com/topic.php?id=4375

But I've noticed the following in the error logs and was wondering if there
is something to prevent this. 

/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/er
ror_log:
[17-Aug-2009 20:23:00] PHP Warning: Cannot modify header information -
headers already sent by (output started at
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php:312)
in
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php
on line 425 

[17-Aug-2009 20:23:00] PHP Warning: Cannot modify header information -
headers already sent by (output started at
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php:312)
in
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php
on line 426 

[17-Aug-2009 20:23:00] PHP Warning: Cannot modify header information -
headers already sent by (output started at
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php:312)
in
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php
on line 427 

[17-Aug-2009 20:23:00] PHP Warning: Cannot modify header information -
headers already sent by (output started at
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php:312)
in
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php
on line 428 

[17-Aug-2009 20:23:00] PHP Warning: Cannot modify header information -
headers already sent by (output started at
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php:312)
in
/home5/threeshe/public_html/threesheetsnorthwest/wp-content/themes/gothamnews/th
umb.php
on line 429 

Any ideas what's happening?  

Line 312 in thumb.php is
`
/**
 * compare the file time of two files
 */
function filemtime_compare($a, $b) {

        return filemtime($a) - filemtime($b);'

And line 425-426 are:

                // send headers then display image
                header("Content-Type: image/png");
                header("Accept-Ranges: bytes");
                header("Last-Modified: " . gmdate("D, d M Y H:i:s",
filemtime($cache_file)) . " GMT");
                header("Content-Length: " . $fileSize);
                header("Cache-Control: max-age=9999, must-revalidate");
                header("Expires: " . gmdate("D, d M Y H:i:s", time() +
9999) . "GMT");

                readfile($cache_file);

Original issue reported on code.google.com by Mmcom...@gmail.com on 18 Aug 2009 at 8:11

GoogleCodeExporter commented 8 years ago
I have the same problems and it causes the error file to get rather large at 
times.

Original comment by thomasba...@gmail.com on 2 Oct 2009 at 4:54

GoogleCodeExporter commented 8 years ago
could you try this with the latest version of TimThumn please? I think it is 
fixed now

Original comment by BinaryMoon on 31 Dec 2009 at 5:20