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
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
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
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
Has there been a change to the way output buffering works?
The manual states for ob_get_contents()
"This will return the contents of the output buffer or FALSE, if output
buffering isn't active."
But the following works in php4.4.4 and php5.2.6 whether output buffering is
on or not
";
echo "o
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
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
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
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
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
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
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_
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=
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=
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:
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
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
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
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
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
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)
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
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
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)
> -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
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 (and strip it from the output we log)
$oldIFvalue = ini_set('implicit_flu
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
richt-
Von: Chris [mailto:[EMAIL PROTECTED]
Gesendet: Samstag, 4. August 2007 01:18
An: php-general@lists.php.net
Betreff: [PHP] Output Buffering and zlib Compression Issue
When I run the following code (PHP 5.2.2, 5.2.3) via Apache (with an
htaccess file), I get this error:
Notice: ob_end_
When I run the following code (PHP 5.2.2, 5.2.3) via Apache (with an
htaccess file), I get this error:
Notice: ob_end_clean() [ref.outcontrol]: failed to delete buffer zlib
output compression. in ...
Can anyone explain what's going on?
I'm assuming it isn't a bug and I've read the document
Hello,
is anyone here getting an intermittent error like this one while
running output buffering?
Warning: Unexpected character in input: ' in
/*//tpl.page.product.php on line 10
Parse error: parse error, unexpected T_STRING in
/*//
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
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 than 4kb) rather than "On" ?
I've played around with it
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
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
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
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
Hi,
When using ob_start(), the output is buffered and not sent till
ob_end_flush() is called or got to end of the script. Also before flushing
you can get the buffer contents by ob_get_contents().
What I want to do is "catch" the output buffer, but do not delay the buffer
to be sent. How is it
Zend (http://www.zend.com/zend/art/buffering.php) offers some
suggestions on output buffering, which I am trying to implement on my
web server (Mac OS X 10.3.5, Apache/1.3.29 (Darwin) PHP/4.3.6). So far,
unsuccessfully.
Has anyone got this working? Here's what I've got:
ob_start("ob_gzhandler"
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
Hi Folks,
I am trying to use outbuffering techniques
ob_start(myCallBack)
.
ob_end_flush()
function myCallBack($inBuffer)
{
//process
ob_start();
include "aPHPFile.php";
$includeFileContents = ob_get_contents();
ob_end_clean();
}
I am seeing the following error "Cann
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
I am having some problems with ob_*
My goals is basically this
Stuff goes here
More stuff here
The code below works until the showImage method is called, it does show the image
however, it does not output the 'Stuff goes here!' line.
any guidance greatfully recieved.
Code is below..
Kevin
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
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:
output_buffering = On
output_handler = ob_gzhandler
At the beginning of my .php script, I include the following:
ob_start(ob_gzhandler);
This retur
Hi,
I'm having a buffering problem with following combination:
-Webserver: Apache 1.3.23
-CGI: PHP 4.2.1
-Client:IE 6.026 (but fails using others as well)
Description:
I want the output buffer of php being flushed to the client in a
time-consuming loop, using the flush() and/or ob_flush
[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
> 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
[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
[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
> 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:/
[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
tember 25, 2002 10:45 AM
Subject: [PHP] Output Buffering - Am I using it correctly?
> Howdy group!
>
> I am outputting a rather large data set to an Excel spreadsheet from a
MySQL
> database on a healthy FreeBSD server. The Apache server is on the same
> server as the database. The
Howdy group!
I am outputting a rather large data set to an Excel spreadsheet from a MySQL
database on a healthy FreeBSD server. The Apache server is on the same
server as the database. The code looks like this
Now, even though I have set ob_start() the headers get sent (as it says in
the d
I seem to have some trouble with a script using the output buffering
functions on a server running v4.1.2.
Everything works fine on the box with 4.2.2. Is this an issue with 4.1.2?
===
Ron Dyck
WebbTech
www.webbtech.net
[EMAIL PROTECTED]
--
PHP Gene
hi,
I'm working on content management system entirely written in Object
oriented PHP using templates
i used output buffering to be able to send header calls in the middle of my
classes
i have noticed that performance has become "random" meaning that the same
script could take from 1 up to 30
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
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
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
as I saw on the manual output_buffering cannot be changed at runtime... so
there is NO WAY? If I want output_buffering I'll have to do it on all my pages?
and does it really cost that much in performance? is it worthed?
. Christian Dechery (lemming)
. http://www.tana
59 matches
Mail list logo