I've got an interesting situation.
I need to run a perl script from within a php application... that's pretty simple
<?PHP passthru('script.cgi'); ?>
Now here is the problem. The script generates a header or two (cookies actually). But since the PHP before the execution sends html... the headers aren't set correctly, they are displayed as text on the page.
So my question is (if you haven't guessed already).
How can output buffering be used to allow the headers to be sent (including those from the perl script) ... then the data (PHP, and perl script's)?
rewriting the script isn't an option. I'm limited to the PHP itself.