You are here: Re: [PHP] ob_start changed from php4 to php5? « PHP « IT news, forums, messages
Re: [PHP] ob_start changed from php4 to php5?

Posted by Marten Lehmann on 09/27/72 11:24

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация