RE: [PHP] ob_start() -- ob_end_flush() problem
- Date: Sat, 29 Apr 2017 19:25:37 +0200
- From: "Arno Kuhl" <arno@xxxxxxxxxxxxxx>
- Subject: RE: [PHP] ob_start() -- ob_end_flush() problem
> On Apr 27, 2017, at 11:57 AM, David Harkness <david.h@xxxxxxxxxxxxxxxxx> wrote:
> How does it fail? Do they get double output? No output? Fatal error?
> Car explodes? You're really not giving us much to go on here. :)
My apologies, you are correct I did not give you much to go on, but then again I don’t have much to go on either.
When I said this fails, I meant it didn’t do what it is supposed to do, namely to capture all the output and echo it at one time.
The unfortunate result is nothing happens at all — it is a blank screen wth no errors, not even in the error log.
If you review the code, you will see the script simply takes an image from a database and echo’s it.
The problem described is that *my code* works for me — whereas, *my code* running on my students accounts does not work.
I’ve been told by the Server’s administrator both my account and my student’s accounts are identical. But this script proves something is different.
So, my question is “What is different?”
To try to figure this out, I am asking this group what could cause this? What could possibly go wrong and what questions should I ask the administrator and help him focus on possible problems? For example, I asked if the settings for the output_buffer were the same and he answered “Yes”. So, I am trying to figure out what else to look for? After all, there *is* something different. We should be able to figure out what.
Again, thanks in advance for any help on this.
To try isolate the problem you could test just the output buffering
/* start buffered output */
// set the header for the image
$page = ob_get_contents();
/* end buffered output */
My output is:
so as David said the output is repeated (echoed twice before ob_end_flush() ).
If the text output either does or doesn't display on your student's terminal it should highlight where the problem lies.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php