forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Nibbler on June 01, 2006, 02:41:26 pm

Title: ob_start and PHP 4.1
Post by: Nibbler on June 01, 2006, 02:41:26 pm
I added a call to ob_start() into init.inc.php to solve issues of whitespace in config.inc.php without noticing that the functon is only available from PHP 4.2. The current stated minimum requirement is 4.1 Shall I a) remove the code b) add in a call to function_exists() or c) do something else ?
Title: Re: ob_start and PHP 4.1
Post by: Paver on June 01, 2006, 05:27:18 pm
Are you sure?  Looking at the PHP docs (http://us3.php.net/ob_start), I don't see such a version restriction.  In fact, it mentions another output buffer function for 4.0.4. 

I see 14 uses of ob_start() in the current scripts.  So if the output buffer is only available in 4.2 and up, I think we need to change the Coppermine requirements.  I know some plugins depend upon the "page_html" filter which is only called once the output buffer is flushed.
Title: Re: ob_start and PHP 4.1
Post by: kegobeer on June 01, 2006, 07:37:13 pm
ob_start is available for all versions of PHP 4/5.  ob_clean is 4.2.0 and later.  In your other post, you commented out ob_start and ob_clean, but perhaps replacing ob_clean with ob_end_clean (which is available for all versions) would perform the same action?
Title: Re: ob_start and PHP 4.1
Post by: Nibbler on June 01, 2006, 07:47:50 pm
Yes, I meant ob_clean(), sorry. I didnt try ob_end_clean, perhaps that will work.
Title: Re: ob_start and PHP 4.1
Post by: Joachim Müller on June 02, 2006, 08:59:08 am
If minimum requirements need to be raised from PHP4.1 to PHP4.2, that would be fine with me. Imo there should be slight pressure on webhosts to upgrade their outdated PHP versions. ;D
Title: Re: ob_start and PHP 4.1
Post by: Joachim Müller on August 10, 2006, 08:09:06 am
Changed corresponding section in docs: minimum requirements are PHP4.2.0 now both in stable and devel branch of CVS. Subsequently, this will go into cpg1.4.9 and cpg1.5.0. Marking as "fixed".