Disable output buffering

software development

#1

Hi,
I have a script that uses many CURL sessions, and their target is pretty slow (4-5 seconds a request). I want to disable output buffering so that the user isnt stuck there with a blank screen while the (hundred) CURL sessions tick off.
I have attempted:

using flush(), ob_flush()… etc etc etc

setting output_buffering directive to false
setting implicit_flush directive to true

here are the returns from ini_get_all:

[output_buffering] => Array
(
[global_value] => 4096
[local_value] => 4096
[access] => 6
)

[implicit_flush] => Array
(
[global_value] =>
[local_value] => 1
[access] => 7
)

I am unaware of what access level 6 means. I do know that 7 is anywhere so makes sense that my ini_set on that directive worked.

I really need to be able to disable the buffering due to the nature of my application.


#2

Well its not that since I just compiled my own php5 with those settings off…

It seems to be mod_gzip on the apache server

Does anyone know how to disable mod_gzip for a specific page?
I have tried:

mod_gzip_on off

in htaccess - but im guessing this doesnt work becuase my php5 is cgi


#3

PHP, whatever version or however it’s used, has nothing to do with non-PHP-related Apache modules like mod_gzip.

Instead of “off”, try “no”:

mod_gzip_on No

If you want useful replies, ask smart questions.


#4

Thanks for the quick responce. This has been the first week that i’v ever SSH’d into a server let alone dealt with setting up all this lovely stuff… its been an experience.

It seems like that ‘mod_gzip_on No’ directive is not being set as the “server” header still lists mod_gzip. Could the server be ignoring my htaccess directive?

It says at https://panel.dreamhost.com/kbase/index.cgi?area=2933 that running as a CGI causes “Custom php directives in .htaccess files to not work”, but as you said, this is an apache directive so that is irrelevant?

For background:
This is my test page on dreamhost: http://www.ryank.net/test/test.php

htaccess:

mod_gzip_on No
AddHandler phpFive .php
Action phpFive /cgi-bin/php.cgi

and this is one on another host: http://209.160.1.250/test.php
I am trying to mimic the second link performance.


#5

It seems like that ‘mod_gzip_on No’ directive is not being set as the “server” header still lists mod_gzip. Could the server be ignoring my htaccess directive?

The server signature is reporting certain modules that are installed and loaded, not necessarily active for the given URI. Note that mod_ssl is also reported even though the site in question probably isn’t using it.


If you want useful replies, ask smart questions.