Problem with output_buffering directive in cli

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using Smarty templates to format HTML emails from the command
line (using cli).  My typical command is:
php filename.php

However, and I am struggling with templates that are greater than 10k.
 It looks like the Smarty output is getting truncated at about 10k.
Smarty uses output_buffering, so I need to be set the output_buffering
directive to "1" or "On" or "1000000", or something other than "Off".
But I have not been able to do that.

I have changed the output_buffering setting in /.../cli/php.ini (as
well as /.../apache2/php.ini & /.../cgi/php.ini for good measure).
And that does seem to have an effect.

Here is what the output from phpinfo() is from the command line:
Directive => Local Value => Master Value
....snip...
output_buffering => 0 => 1000000
output_handler => no value => no value
...snip...

So in other words, when I change the value in my /.../cli/php.ini, the
"Master Value" changes. However, the "Local Value" stays at "0".

In my code, I am testing for the value of output_buffering (using
ini_get("output buffering")), and its value is always "0" (same as the
"Local Value" that is output from the phpinfo().

So my question is...how do I turn on output_buffering correctly from
the command line?  Am I configuring the /.../cli/php.ini file
correctly?  Is something in my code (maybe an included library) maybe
setting that value without me knowing?  Am I looking in the wrong
place / headed in the wrong direction?

Mike

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux