PHP 4.0 Bug #7008: Virtual() does not work with Output Buffering
| From: | rich at todobebe dot com | Date: | Wed, 04 Oct 2000 07:35:22 +0000 |
| Subject: | PHP 4.0 Bug #7008: Virtual() does not work with Output Buffering | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34198@lists.php.net to get a copy of this message | ||
From: rich@todobebe.com
Operating system: RedHat 6.2
PHP version: 4.0.2
PHP Bug Type: Output Control
Bug description: Virtual() does not work with Output Buffering
I'm using apache 1.3.12.
Configure Line ( from phpinfo() ):
./configure' '--with-gd=/usr/local' '--with-jpeg-dir=/usr/local'
'--with-ttf=/usr/local' '--with-apxs=/www/bin/apxs'
'--with-mysql=/usr/local/mysql' '--enable-sysvsem' '--enable-sysvshm'
'--with-zlib' '--disable-debug' '--enable-inline-optimization'
'--enable-wddx' '--enable-sockets' '--with-mm'
The bit of code that does it on my setup:
<?php
ob_start();
virtual( $HTTP_SERVER_VARS['PATH_INFO'] . '?' . $QUERY_STRING );
$content = ob_get_contents();
ob_end_clean();
?>
The code in the virtual() call should obviously be replaced with something relevant on your setup.
When virtual is called, the output is immediately sent to the browser and not assigned to $content .
I have a virtually identical script using an include() instead of virtual() and it works perfectly.