Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: ob_start and PHP 4.1  (Read 8998 times)

0 Members and 1 Guest are viewing this topic.

Nibbler

  • Guest
ob_start and PHP 4.1
« 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 ?
« Last Edit: August 10, 2006, 08:09:18 am by GauGau »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: ob_start and PHP 4.1
« Reply #1 on: June 01, 2006, 05:27:18 pm »

Are you sure?  Looking at the PHP docs, 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.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: ob_start and PHP 4.1
« Reply #2 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?
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Nibbler

  • Guest
Re: ob_start and PHP 4.1
« Reply #3 on: June 01, 2006, 07:47:50 pm »

Yes, I meant ob_clean(), sorry. I didnt try ob_end_clean, perhaps that will work.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: ob_start and PHP 4.1
« Reply #4 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: ob_start and PHP 4.1
« Reply #5 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".
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.