Welcome Guest, Not a member yet? Register   Sign In
image processor and sessions


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 ?

Theme © iAndrew 2016 - Forum software by © MyBB