Re: ob_start changed from php4 to php5?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

I'm also guessing that it's the LAST line of the file with the
"encodeDomain" function in it that you "include" in your test.php

I'm also guessing that there's a NEWLINE character after the final ?>
in that file on your 5.0.4 box, but that NEWLINE character is *NOT*
there on your 4.0 box.

No, there are no newlines at the end of any files. The problem was a new behavior of system() in PHP5:

"The system() call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module."

Obviously system() in PHP5 tries to flush, but because it's wrapped in ob_start() end ob_end_clean(), it's doesn't actually do. Unfortunately an interal flag in PHP is set to "output has been sent" anyway (bug?). I first changed it to passthru() instead of system(), but maybe I should use shell_exec() in the future.

Regards
Marten

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux