To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > Linux/Unix Help

Linux/Unix Help Help with server-side Linux and Unix issues

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-28-2002, 09:16 PM   #1
dspillett
Junior Member
 
Join Date: Sep 2002
Posts: 3
[A] flush() not woking on Linux+Apache?

I'm playing with some code that performs a few heavy DB queries, and uses calls to the flush() function in order to give the user some basic progress information.

This works fine on my paid-for web hosts configuration, butnot on any of my home setups. I don't expect it to work on Win32 as the manual states that is won't, but the flush() command doesn't seem to have any effect on my Linux/Apache/php setup either.

One of the user notes on the manual page for flush() is to call ob_flush() as well - but if I try that PHP reports that the ob_flush doesn't exist... [though it doesn't complain about ob_start].

FYI: the versions I have installed are:
Apache 1.3.26
PHP 4.1.2
Over-all the machine is a fairly basic/standard Debian Woddy [kernel 2.2.20] setup.

Are there any settings that I have missed that enable/change the output buffering behaviour?

Last edited by dotwebbie; 10-03-2002 at 07:59 PM.
dspillett is offline   Reply With Quote
Old 09-28-2002, 09:25 PM   #2
dspillett
Junior Member
 
Join Date: Sep 2002
Posts: 3
Oh, and ob_implicit_flush doesn't seem to have the desired effect either...
dspillett is offline   Reply With Quote
Old 09-30-2002, 11:51 AM   #3
dotwebbie
Expert at something . . .
 
Join Date: Aug 2002
Posts: 287
Is flush() not enabled on your home system? Which version of php? Is it the same version as your host?
dotwebbie is offline   Reply With Quote
Old 10-03-2002, 07:33 PM   #4
dspillett
Junior Member
 
Join Date: Sep 2002
Posts: 3
flush() is working as expected on my webhost (RedHat some-thing-or-other, PHP4.1.2) but not on my home test box (fairly normal Debian setup with relevant security patches, PHP4.1.2).

As far as I can tell there is nothing more I need to do in order to get flush() to work on my test box.

Its not really a problem anymore though: I've rewritten the scripts so that they don't need to use flush() - this way I can make use of mod_gzip.
dspillett is offline   Reply With Quote
Old 10-14-2002, 12:02 PM   #5
jasongonella
Junior Member
 
Join Date: Mar 2001
Posts: 21
Set output buffering to off in the php.ini file - this'll do it. You can keep implicit_flush off as well.

Jason
jasongonella is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:39 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.