I just moved a site I built from my development server to the clients server and am having an issue I can't figure out. I have a class file that handle's uploading and deleting images. When the user uploads an image I do a header redirect when the action has been successful like so:
$message = urlencode('Your slide has been updated');
header('Location: ' . $cms->base_url . '?page=' .
$_GET['page'] . '&message=' . $message);
On the development site this works just fine, but on the live site I get the "Cannot modify header. Header already set" error message. I have spent a lot of time researching solutions but haven't found anything. Any idea's of why this works on one server but not on the other? I have already read this: How to fix "Headers already sent" error in PHP