ID:               19440
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Bogus
 Bug Type:         Output Control
 Operating System: W2K
 PHP Version:      4.2.3
 New Comment:

I found the same problem with version 4.2.1 under Linux.


Previous Comments:
------------------------------------------------------------------------

[2002-09-16 13:21:06] [EMAIL PROTECTED]

I found what is causing it. Setting "ob_gzhandler" as the default
output handler in the php.ini or in a script, causes this behaviour.
if "ob_gzhandler" is not used, buffering is fine.

------------------------------------------------------------------------

[2002-09-16 13:04:39] [EMAIL PROTECTED]

In the example I removed some elements from the array and forgot to
delete last comma. sorry

------------------------------------------------------------------------

[2002-09-16 13:02:05] [EMAIL PROTECTED]

When any of these 2 functions are called, I get no output or the output
is garbled.
eg (I run this at the end of printable pages, to remove form fields,
etc... Get buffer, change it, then print it):

$search = Array(
"|<script[^>]*?>.*?</script>|si",
"|<a href=\"#topo\">.*?</a>|si",
"|<form[^>]*?>.*?</form>|si",
"|<a[^>]*?>|si",
"|</a\s*>|si",
);

$contents = ob_get_contents();  // gets output buffer, empties it and
print without forms
ob_clean();
echo preg_replace($search, '', $contents);

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19440&edit=1

Reply via email to