#1505 topic_image.php causing php log errors

v1.7.7
open
nobody
PHP Error (166)
5
2012-12-08
2004-06-15
Mark Cooper
No

topic_image.php is causing the following error in the
php error log:-

[15-Jun-2004 15:00:12] PHP Warning: Cannot modify
header information - headers already sent by (output
started at /var/www/blah/topic_image.php:19) in
/var/www/blah/topic_image.php on line 34

I believe this is due to the header and readfile lines
being run twice so this patch should fix it:-

--- topic_image.php.ORIG 2004-06-15
15:01:47.000000000 +0100
+++ topic_image.php 2004-06-15 15:01:54.000000000 +0100
@@ -15,8 +15,6 @@

if (is_file("temp/topic.".$_REQUEST["id"]) and
(!isset($_REQUEST["reload"]))) { $size =
getimagesize("temp/topic.".$_REQUEST["id"]);
- header ("Content-type: ".$size['mime']);
- readfile("temp/topic.".$_REQUEST["id"]);
} else {
include_once ('db/tiki-db.php');
include_once ('lib/tikilib.php');

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks