Edit report at https://bugs.php.net/bug.php?id=65416&edit=1

 ID:                 65416
 Updated by:         yohg...@php.net
 Reported by:        jwestbrook at gmail dot com
 Summary:            output buffering autostart setting php.ini
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Output Control
 Operating System:   linux 64bit AWS ami
 PHP Version:        5.4.17
 Block user comment: N
 Private report:     N

 New Comment:

"#!" does not have special meaning for Web server SAPI.

I think you are sending data larger than output buffer size. Then this is the 
way supposed to be.

output_buffering=On or 1 is special. It enables unlimited buffering. Anything 
other values set buffer chunk size and PHP tries to send data larger than chunk 
size.

Check your buffer size (i.e. output_buffering setting of php.ini file)
I guess you have very small output_buffering. Old output buffer increases size 
automatically, IIRC. New output buffer does not increase buffer size.


Previous Comments:
------------------------------------------------------------------------
[2013-08-07 19:47:35] jwestbrook at gmail dot com

Description:
------------
We recently upgraded from php 5.3 to php 5.4 and when the php.ini 
output_buffering 
setting is set to ON or anything greater than zero the output buffering does 
not 
always reliably start.


This is a problem for some scripts that have a shebang as the first line to 
make 
the script easily executable. But if you send a header or anything else after 
that 
first line it will fail.


based on the script attached the contents of the error log are

buffer statues : Array\n(\n)\n

Test script:
---------------
#!/usr/bin/php
<?php

$buffer_length = ob_get_length();
if($buffer_length != 15)
{
    error_log('buffer statues : '.print_r(ob_get_status(TRUE),1));
    exit;
}

//this header call will not always be successful
header("Content-type: application/pdf");

?>



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=65416&edit=1

Reply via email to