[PHP-DEV] output buffering problem

2002-12-17 Thread electroteque
hi guys i have the latest cvs , my function used to work now it doesnt

function
progressbar_percentage($i,$files,$newwin,$moviename,$status,$sleep=null){
 if (is_array($files)) $per = $i/count($files); else $per = $i/$files;
 $per = $per*100;
 $buffer = script language=\javascript\\n;
 $buffer .= var movie=.$newwin..document..$moviename.;\n;
 $buffer .= movie.TGotoFrame(\_root.Status\, 1);\n;
 $buffer .= movie.SetVariable(\_root.Status.processing\,
\.$status.\);\n;
 $buffer .= movie.TSetProperty(\_root.Bar\,2, .ceil($per).);\n;
 $buffer .= movie.SetVariable(\_root.Percent.per\, \.ceil($per).
%\);\n;
 $buffer .= /script\n;
 print ($buffer);
 flush();
 sleep(1);
}

this i meant to flush on every loop and show a progress percentage although
now php wont flush anything until half way through the loop and causes
javascript errors as it never flushed until too late , what could be the
problem ?



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




Re: [PHP-DEV] output buffering

2002-10-07 Thread Zeev Suraski

I requested that Yasuo reverts his patches, repeatedly, but as he hasn't, I 
was forced to do it manually myself.  If I screwed up while reverting the 
patches myself, I apologize.  I'll take a look.

Zeev

At 08:30 07/10/2002, Derick Rethans wrote:
On Sun, 6 Oct 2002, Rasmus Lerdorf wrote:

  I thought those changes were reverted?

Not all as it seems... Christian Stocker also reported some problems
IIRC.

Derick

 
  On Mon, 7 Oct 2002, Sascha Schumann wrote:
 
   Hi,
  
   the recent changes in the output buf layer are causing PHP to
   buffer data too aggressively.
  
   The test case outputs two lines of HTML a few times and
   expects these lines to be immediately forwarded to the url
   scanner.  Regardless of the output_buffering/implicit_flush
   ini settings, the HTML is buffered and does not get to the
   scanner until the script finishes.
  
   During the script, we change the behaviour of the URL scanner
   by modifying the tags its matching on.  Only the last INI
   setting is applied to the HTML output.  Sprinkling the code
   with flush()es and enabling implicit_flush does not help.
  
   http://lxr.php.net/source/php4/ext/session/tests/021.phpt
  
   - Sascha
  
  
   --
   PHP Development Mailing List http://www.php.net/
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 

--

---
  Derick Rethans   http://derickrethans.nl/
  JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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


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




[PHP-DEV] output buffering

2002-10-06 Thread Sascha Schumann

Hi,

the recent changes in the output buf layer are causing PHP to
buffer data too aggressively.

The test case outputs two lines of HTML a few times and
expects these lines to be immediately forwarded to the url
scanner.  Regardless of the output_buffering/implicit_flush
ini settings, the HTML is buffered and does not get to the
scanner until the script finishes.

During the script, we change the behaviour of the URL scanner
by modifying the tags its matching on.  Only the last INI
setting is applied to the HTML output.  Sprinkling the code
with flush()es and enabling implicit_flush does not help.

http://lxr.php.net/source/php4/ext/session/tests/021.phpt

- Sascha


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




Re: [PHP-DEV] output buffering

2002-10-06 Thread Rasmus Lerdorf

I thought those changes were reverted?

On Mon, 7 Oct 2002, Sascha Schumann wrote:

 Hi,

 the recent changes in the output buf layer are causing PHP to
 buffer data too aggressively.

 The test case outputs two lines of HTML a few times and
 expects these lines to be immediately forwarded to the url
 scanner.  Regardless of the output_buffering/implicit_flush
 ini settings, the HTML is buffered and does not get to the
 scanner until the script finishes.

 During the script, we change the behaviour of the URL scanner
 by modifying the tags its matching on.  Only the last INI
 setting is applied to the HTML output.  Sprinkling the code
 with flush()es and enabling implicit_flush does not help.

 http://lxr.php.net/source/php4/ext/session/tests/021.phpt

 - Sascha


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



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




Re: [PHP-DEV] output buffering

2002-10-06 Thread Derick Rethans

On Sun, 6 Oct 2002, Rasmus Lerdorf wrote:

 I thought those changes were reverted?

Not all as it seems... Christian Stocker also reported some problems 
IIRC.

Derick

 
 On Mon, 7 Oct 2002, Sascha Schumann wrote:
 
  Hi,
 
  the recent changes in the output buf layer are causing PHP to
  buffer data too aggressively.
 
  The test case outputs two lines of HTML a few times and
  expects these lines to be immediately forwarded to the url
  scanner.  Regardless of the output_buffering/implicit_flush
  ini settings, the HTML is buffered and does not get to the
  scanner until the script finishes.
 
  During the script, we change the behaviour of the URL scanner
  by modifying the tags its matching on.  Only the last INI
  setting is applied to the HTML output.  Sprinkling the code
  with flush()es and enabling implicit_flush does not help.
 
  http://lxr.php.net/source/php4/ext/session/tests/021.phpt
 
  - Sascha
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




[PHP-DEV] Output Buffering and error messages?

2002-07-04 Thread Kristian Koehntopp


How does PHP handle error messages when some ob_handler is 
engaged? Are they caught as well? If so, why?

Kristian


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




[PHP-DEV] Output Buffering problem w/ PHP-4.0.5RC2

2001-03-29 Thread Anil Madhavapeddy

Making HEAD requests to a page which has had output buffering activated just
results in the connection being closed with no response.  This makes it
pretty unusable.  Can anyone else reproduce this problem?

Two scripts:

nobuffer.php:
?  print "hello world!"; ?

buffer.php:
? ob_start(); print "hello buffered world!"; ob_end_flush(); ?

nobuffer.php responds to the GET/HEAD requests fine.
buffer.php responds correctly to the GET, but not the HEAD.

Transcript is below:

[avsm@brick /]$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /~avsm/nobuffer.php HTTP/1.1
Host: localhost

HTTP/1.1 200 OK
Date: Thu, 29 Mar 2001 22:48:24 GMT
Server: Apache/1.3.12 (Unix) PHP/4.0.5RC2 mod_ssl/2.6.6 OpenSSL/0.9.5a
X-Powered-By: PHP/4.0.5RC2
Transfer-Encoding: chunked
Content-Type: text/html

c
hello world!
0

[avsm@brick /]$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD /~avsm/nobuffer.php HTTP/1.1
Host: localhost

HTTP/1.1 200 OK
Date: Thu, 29 Mar 2001 22:49:00 GMT
Server: Apache/1.3.12 (Unix) PHP/4.0.5RC2 mod_ssl/2.6.6 OpenSSL/0.9.5a
X-Powered-By: PHP/4.0.5RC2
Content-Type: text/html

[avsm@brick /]$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /~avsm/buffer.php HTTP/1.1
Host: localhost

HTTP/1.1 200 OK
Date: Thu, 29 Mar 2001 22:49:34 GMT
Server: Apache/1.3.12 (Unix) PHP/4.0.5RC2 mod_ssl/2.6.6 OpenSSL/0.9.5a
X-Powered-By: PHP/4.0.5RC2
Transfer-Encoding: chunked
Content-Type: text/html

15
hello buffered world!
0

[avsm@brick /]$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD /~avsm/buffer.php HTTP/1.1
Host: localhost

Connection closed by foreign host.


I'll upgrade to RC4 in a bit and check if that makes a difference (not seen
the ChangeLogs between them yet)
(Platform is OpenBSD-2.8-stable).  There is nothing in the Apache error log.

Anil


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Output Buffering problem w/ PHP-4.0.5RC2

2001-03-29 Thread Anil Madhavapeddy


 I'll upgrade to RC4 in a bit and check if that makes a difference (not
seen
 the ChangeLogs between them yet)
 (Platform is OpenBSD-2.8-stable).  There is nothing in the Apache error
log.


The problem is still there in RC4 also.

Anil


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]