Re: [PHP] Output buffering

2009-10-07 Thread David Otton
2009/10/7 Arno Kuhl : > Thanks David. After taking another look at the description for ob_start() I > began to suspect there was a difference, but the manual doesn't mention > anything about it. And the fact they use the same terminolgy for both the > settings and the functions is confusing. I can

Re: [PHP] Output buffering

2009-10-07 Thread Shawn McKenzie
Arno Kuhl wrote: > > Thanks David. After taking another look at the description for ob_start() I > began to suspect there was a difference, but the manual doesn't mention > anything about it. And the fact they use the same terminolgy for both the > settings and the functions is confusing. I can se

RE: [PHP] Output buffering

2009-10-07 Thread Arno Kuhl
From: djo...@gmail.com [mailto:djo...@gmail.com] On Behalf Of David Otton Sent: 07 October 2009 10:54 AM To: a...@dotcontent.net Cc: php-general@lists.php.net Subject: Re: [PHP] Output buffering 2009/10/7 Arno Kuhl : > According to the manual I shouldn't see anything at

Re: [PHP] Output buffering

2009-10-07 Thread David Otton
2009/10/7 Arno Kuhl : > According to the manual I shouldn't see anything at all when > output_buffering is off (or if memory serves me correctly I should see an > error about "headers already sent" or something). Looking at phpinfo > confirms the value echoed by the script. Has something changed w

Re: [PHP] output buffering in CLI script.

2008-02-29 Thread Jochem Maas
Greg Donald schreef: On 2/28/08, Casey <[EMAIL PROTECTED]> wrote: #!/usr/bin/php Or the entirely more portable version: #!/usr/bin/env php thanks for the tip :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] output buffering in CLI script.

2008-02-29 Thread Greg Donald
On 2/28/08, Casey <[EMAIL PROTECTED]> wrote: > #!/usr/bin/php Or the entirely more portable version: #!/usr/bin/env php http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jim Lucas
Casey wrote: On Thu, Feb 28, 2008 at 3:39 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: hi there, I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (an

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Casey
On Thu, Feb 28, 2008 at 3:39 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: > hi there, > > I can't seem to manage to buffer output (of an included file) in a CLI > script, > the following does not work: > > > // buffer output so we can avoid the shebang line being > output (an

Re: [PHP] Re: [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Nathan Rixham schreef: how's this? #!/usr/bin/php data = ltrim($bucket->data,"#!/usr/bin/php\n"); $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } } stream_filter_register("trim.shebang", "trimshebang"); include "php://filter/rea

Re: [PHP] [NOT SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Jochem Maas schreef: ... indeed ... I tested it and it works on my server too. my code is no different to yours with regard to the context of the problem. so what's going on. I think (I know) I forgot to mention one tiny little detail. the whole 'include' code occurs in a script that forks

Re: [PHP] Re: [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Nathan Rixham
Aschwin Wesselius wrote: Me thinks that when shebang doesn't fit /usr/bin/php (which happens sometimes) you're doomed. [snip] good point.. modified to use BINDIR: #!/usr/bin/php data = ltrim($bucket->data,"#!".PHP_BINDIR."/php\n"); $consumed += $bucket->datalen; stream_bucket_

Re: [PHP] Re: [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Aschwin Wesselius
Nathan Rixham wrote: how's this? #!/usr/bin/php data = ltrim($bucket->data,"#!/usr/bin/php\n"); $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } } stream_filter_register("trim.shebang", "trimshebang"); include "php://filter/read=

[PHP] Re: [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Nathan Rixham
how's this? #!/usr/bin/php data = ltrim($bucket->data,"#!/usr/bin/php\n"); $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } } stream_filter_register("trim.shebang", "trimshebang"); include "php://filter/read=trim.shebang/resource=

[PHP] [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Stuart Dallas schreef: On 28 Feb 2008, at 12:29, Jochem Maas wrote: Stuart Dallas schreef: On 28 Feb 2008, at 11:52, Stut wrote: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work:

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: ... -Stut bit of false logic here but have you tried: eval(ltrim(file_get_contents($script),$shebang)); haven't tried it, did consider it. I hate eval() :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Aschwin Wesselius
Jochem Maas wrote: I mean that the shebang line at the top of the included file is output to stdout even when I turn on output buffering on prior to including the file. nothing else is output but that's because the script doesn't generate any further output - it logs everything instead - and

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Stuart Dallas
On 28 Feb 2008, at 12:29, Jochem Maas wrote: Stuart Dallas schreef: On 28 Feb 2008, at 11:52, Stut wrote: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer outp

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Nathan Rixham
Jochem Maas wrote: Stut schreef: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (and strip it from the

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Stuart Dallas schreef: On 28 Feb 2008, at 11:52, Stut wrote: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being out

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Stut schreef: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (and strip it from the output we log)

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Andrés Robinet schreef: -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 6:39 AM To: [php] PHP General List Subject: [PHP] output buffering in CLI script. hi there, I can't seem to manage to buffer output (of an included file) in a CLI scr

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Stuart Dallas
On 28 Feb 2008, at 11:52, Stut wrote: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (and strip it from

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Stut
On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (and strip it from the output we log)

RE: [PHP] output buffering in CLI script.

2008-02-28 Thread Andrés Robinet
> -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 28, 2008 6:39 AM > To: [php] PHP General List > Subject: [PHP] output buffering in CLI script. > > hi there, > > I can't seem to manage to buffer output (of an included file) in a CLI > script, >

RE: [PHP] Output Buffering and zlib Compression Issue

2007-08-03 Thread Jan Reiter
Right! With zlib compression ob_start() or similar seems to get called before the user script execution. I'm not quite sure why. Anyhow ob_get_level() returns 2 after the ob_start() is called for the first time in the script. You can avoid the error with while (ob_get_level() > 1) { o

RE: [PHP] Output Buffering and zlib Compression Issue

2007-08-03 Thread Jan Reiter
Hi! I'm not quite sure what you are trying to do ... Why do you use output buffering in your code, when you turn it off in the htaccess directive?? php_flag output_buffering Off The code worked for me. But I tested it without your htaccess settings ... Jan -Ursprüngliche Nachricht- V

Re: [PHP] output buffering / output compression

2005-06-11 Thread Richard Lynch
On Thu, June 9, 2005 12:22 am, Paul Birnstihl said: > I have recently set up a machine with PHP with both buffering and > compression turned on. Some of the pages being served include up to 3MB > of HTML. > > Can someone explain the benefit(s) of setting these ini directives to > values (ie. larger

Re: [PHP] Output buffering - saving + echoing

2004-12-15 Thread Richard Lynch
Lorderon wrote: > What I want to do is "catch" the output buffer, but do not delay the > buffer > to be sent. How is it done? I see three options here: #1 Call ob_start/ob_get_contents/ob_flush and repeat that a *LOT* within your script, so that you are buffering only a few lines of text at any g

Re: [PHP] Output buffering - saving + echoing

2004-12-15 Thread Lorderon
Hi, "Brent Baisley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Not exactly sure what your question is. You want to catch the buffer, > but don't delay the buffer to be sent??? > If your question is that you want to hold the contents of the buffer > and send it only when you are

Re: [PHP] Output buffering - saving + echoing

2004-12-15 Thread Lorderon
Hi, "Brent Baisley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Not exactly sure what your question is. You want to catch the buffer, > but don't delay the buffer to be sent??? > If your question is that you want to hold the contents of the buffer > and send it only when you are

Re: [PHP] Output buffering - saving + echoing

2004-12-15 Thread Brent Baisley
Not exactly sure what your question is. You want to catch the buffer, but don't delay the buffer to be sent??? If your question is that you want to hold the contents of the buffer and send it only when you are ready, don't use ob_end_flush, use ob_end_clean. The buffer is cleared without sending

Re: [PHP] output buffering display handlers....

2004-03-16 Thread Tom Rogers
Hi, Wednesday, March 17, 2004, 11:36:02 AM, you wrote: P> Hi Folks, P> I am trying to use outbuffering techniques P> ob_start(myCallBack) P> . P> ob_end_flush() P> function myCallBack($inBuffer) P> { P> //process P> ob_start(); P> include "aPHPFile.php"; P> $includeFileC

Re: [PHP] output buffering

2003-02-27 Thread Leif K-Brooks
You can't display an image like that in HTML. You need to make a second PHP script that displays just the image, and call it with a tag. Kevin Waterson wrote: >I am having some problems with ob_* > >My goals is basically this > >Stuff goes here > >More stuff here > >The code below works until th

Re: [PHP] output buffering problem

2002-11-16 Thread Colin Kettenacker
webmaster [EMAIL PROTECTED] on 11/15/02 3:47 PM wrote: > I'm trying to enable output buffering to speed up the load time of some > of our php web pages. I've consulted the manual and enabled the > following: The manual lacks description for this topic. Take a look at this article at Developer Sh

RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Jay Blanchard
[snip] OK. One of the silly classes fails, saying -- Fatal error: No parent class available in this context in biff.php on line 52 line 52 is -- 49 function BiffWriter() 50 { 51 error_reporting (E_ALL); 52 parent::BiffBase(); 53 $this->_fill_AA_notati

RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Beau Hartshorne
> Can you get the server to write it to a file, and then let the client > download the file normally? > [/snip] > > Believe me, if I could have taken that way out I would have done it. I am > researching some classes, but they all seem to take just as long to create > the spreadsheet. What about

RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Jay Blanchard
[snip] I am researching some classes [/snip] OK. One of the silly classes fails, saying -- Fatal error: No parent class available in this context in biff.php on line 52 line 52 is -- 49 function BiffWriter() 50 { 51 error_reporting (E_ALL); 52 parent::B

RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Jay Blanchard
[snip] > I guess that this means I am out of luck here. Anyone know a cleaner > method for delivering spreadsheets? Can you get the server to write it to a file, and then let the client download the file normally? [/snip] Believe me, if I could have taken that way out I would have done it. I am

RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Beau Hartshorne
> I guess that this means I am out of luck here. Anyone know a cleaner > method for delivering spreadsheets? Can you get the server to write it to a file, and then let the client download the file normally? Beau -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Jay Blanchard
[snip] Output buffering is doing nothing for you in the given example. It does not reduce client side resources... if anything it increases the usage serverside resources. Perhaps you are thinking of gz compression? You might use a combination of ob* functions and gz* functions to minimize band

Re: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Kevin Stone
Output buffering is doing nothing for you in the given example. It does not reduce client side resources... if anything it increases the usage serverside resources. Perhaps you are thinking of gz compression? You might use a combination of ob* functions and gz* functions to minimize bandwidth r

Re: [PHP] output buffering

2001-04-05 Thread Plutarck
I know what you mean. Until I decided to kill all but one single echo/print call, which is in a function I call at the bottom of the script, I often ran into problems where I needed to echo something at the top of a really really long control loop, but nested deep within it I had to set a cookie o

Re: [PHP] output buffering

2001-04-05 Thread Christian Dechery
At 00:26 5/4/2001 -0500, Plutarck wrote: >http://www.php.net/manual/en/ref.outcontrol.php > >If you want to use output buffering you must use the ob_* family of >functions. > >In any script where you want it used you _must_ use it explicitly, or so do >in an included file. Unless you can change th

Re: [PHP] output buffering

2001-04-04 Thread Plutarck
http://www.php.net/manual/en/ref.outcontrol.php If you want to use output buffering you must use the ob_* family of functions. In any script where you want it used you _must_ use it explicitly, or so do in an included file. Unless you can change the php.ini, there is no way to force all pages to