[PHP-DEV] PHP 4.0 Bug #9212: fpassthru ignoring output buffering

2001-02-11 Thread ctuffli

From: [EMAIL PROTECTED]
Operating system: Linux 2.2.12-20
PHP version:  4.0.4
PHP Bug Type: Output Control
Bug description:  fpassthru ignoring output buffering

When fpassthru() is used within an ob_start / ob_end_clean block, a subsequent call to 
header() fails because headers have already been sent. The following script reproduces 
the problem:

?php
$fd = fopen(__FILE__, "r");
ob_start();
fpassthru($fd);
ob_end_clean();
header("X-Test: fpassthru already sent headers");
?

Ran as cgi (ie 'php head.php'), but the apache module exhibits the same problem. This 
problem may be similar to bug #8807

./configure --with-apxs=/usr/local/etc/httpd/bin/apxs --enable-versioning --with-mysql 
--enable-track-vars

no php.ini is used


-- 
Edit Bug report at: http://bugs.php.net/?id=9212edit=1



-- 
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]




[PHP-DEV] PHP 4.0 Bug #9212 Updated: fpassthru ignoring output buffering

2001-02-11 Thread ctuffli

ID: 9212
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Feature/Change Request
Description: fpassthru ignoring output buffering

Actually, fpassthru seems to partial support the output buffering as placing it 
between ob_start / ob_end_clean generates no output. ob_get_contents() placed after 
the fpassthru correctly returns the output fpassthru would have generated. My concern 
here was that fpassthru seems to be generating a header (headers_sent() returns true) 
even though the rest of the output is being correctly buffered. Is the buffering 
happening by a happy accident?

Is there a list of functions that work (or don't work) with output buffering?

Previous Comments:
---

[2001-02-11 11:17:15] [EMAIL PROTECTED]
passtru doesn't use the output buffering functions. It's not meant to be, so changing 
to Feature request.

---

[2001-02-11 11:06:21] [EMAIL PROTECTED]
When fpassthru() is used within an ob_start / ob_end_clean block, a subsequent call to 
header() fails because headers have already been sent. The following script reproduces 
the problem:

?php
$fd = fopen(__FILE__, "r");
ob_start();
fpassthru($fd);
ob_end_clean();
header("X-Test: fpassthru already sent headers");
?

Ran as cgi (ie 'php head.php'), but the apache module exhibits the same problem. This 
problem may be similar to bug #8807

./configure --with-apxs=/usr/local/etc/httpd/bin/apxs --enable-versioning --with-mysql 
--enable-track-vars

no php.ini is used

---


Full Bug description available at: http://bugs.php.net/?id=9212


-- 
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]




[PHP-DEV] PHP 4.0 Bug #9072: unexpected behavior in strip_tags

2001-02-02 Thread ctuffli

From: [EMAIL PROTECTED]
Operating system: RedHat 6.1
PHP version:  4.0.4
PHP Bug Type: Feature/Change Request
Bug description:  unexpected behavior in strip_tags

php setup: ./configure  --with-apxs=/usr/local/etc/httpd/bin/apxs --enable-versioning 
--with-mysql --enable-track-vars

script: ?php
print strip_tags(" from an earlier email\n");
?

prints

X-Powered-By: PHP/4.0.4
Content-type: text/html

 from an earlier email

and not
 from an earlier email

I'm writting an application which prints email messages and noticed this behavior in 
messages that quoted the previous message with the string " ".  I expected strip_tags 
to do the equivalent of ereg_replace("[^]*", "", $msg)


-- 
Edit Bug report at: http://bugs.php.net/?id=9072edit=1



-- 
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]