I have a full app running with the setup you describe, but I'm running php4 with phplib.
Anytime you issue a header("location: blah") in php, you should always do an exit() right after, or else your script will continue to run.
Try that to see if it fixes your prob.