CodeIgniter Forums
image processor and sessions - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: image processor and sessions (/thread-45801.html)

image processor and sessions - El Forum - 10-06-2011


i have a controller that manages all my images
the idea is that i want to show some images based on session variables

i call the controller in my html like this
<img src="http://site/image_processor/parameter/parameter/">

my controller logic is like this
make some verifications if user is ok then show image like this
$im = @imagecreatefromjpeg($image);
    header("Content-type: image/jpg");
the function _img_error generates a image with a text containing the error so i always output a image

the problem is that i get a lot of errors in my logs because the headers are already sent
when the session lib sets the cookie

any idea on how to solve this ?