PHP_FLAG output_buffering on .htaccess

Discussion in 'PHP' started by caratking, Jun 4, 2007.

  1. #1
    I've got a few different PHP sites, running on a few different hosts.

    I use a fairly 'standard' .htaccess on all the sites. I've noticed that one hosting system will crash with 500 Internal Server Error if I add the following:

    PHP_FLAG output_buffering on

    The log files on the server state:

    Invalid command 'PHP_FLAG', perhaps mis-spelled or defined by a module not included in the server configuration

    So, whats the deal? Can the ISP have PHP flags shut off or something? I did phpinfo() and scanned through there but nothing stood out.

    Anyone got ideas? Ideally I would like to make it work, but if it would not crash the server it would be nice also.
     
    caratking, Jun 4, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Try php_value.
     
    nico_swd, Jun 4, 2007 IP
  3. postcd

    postcd Well-Known Member

    Messages:
    1,043
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #3
    What actually php_flag output_buffering do?

    i have this in htaccess:
    <Ifmodule mod_php4.c>
            php_flag output_buffering  off
    </Ifmodule>
    
    <Ifmodule mod_php5.c>
            php_flag output_buffering  off
    </Ifmodule>
    Code (markup):
     
    postcd, Apr 3, 2014 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    First thing: don't have stuff in your .htaccess file you don't know what does.
    Second, Google is a pretty powerful search engine.
    Third: it turns off output buffering. Output buffering, among other things, buffers the output before showing it to the user, and, among other things, allows for headers to be output after echoing content, for instance. Turning it off means the page is shown as it is built (while it outputs).
     
    PoPSiCLe, Apr 3, 2014 IP
  5. postcd

    postcd Well-Known Member

    Messages:
    1,043
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #5
    what does the output buffering means for me as a webmaster. and buffer is in memory?
     
    postcd, Apr 3, 2014 IP
  6. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470