Hello,
Could someone help me understand why later versions of PHP (4.3.9,
4.3.10, & 5.0.3) do not maintain the same
ordering for virtual() call output as the older versions? Basically,
generated pages that worked in
PHP 4.3.7 & PHP 4.3.8 are now broken. Setting the "output_buffering=0"
seems to help on some pages, but it
is still broken on others. The content generated from the virtual()
call inside a page ends up in the browser
before the opening <HTML> tag. See the simplified example below:
Source page:
<html>
<head>
<style type="text/css">
<?php require "./glob.css" ?>
</style>
<meta http-equiv="pragma" content="no-cache">
<script>
<?php
virtual('chp.js') ;
virtual('/hostinfo/getinfo');
?>
...
Expected in the browser:
<html>
<head>
<style type="text/css">
BODY { font-famliy:Veranda }
.pageheader { font-size:12 }
</style>
<meta http-equiv="pragma" content="no-cache">
<script>
<!-- begin content from virtual chp.js.en (about 5569 bytes of
javascript) -->
var moo=3;
function pagein()
{
var rc=false;
retrun rc;
}
<!-- end content from virtual chp.js.en -->
<!-- begin content from virtual /hostinfo/getname -->
var myhostname="This computer is localhost.localdomain";
var myipaddress="127.0.0.1";
<!-- end content from virtual /hostname/getname -->
...
Actually in the browser:
<!-- begin content from virtual chp.js.en (about 5569 bytes of
javascript) -->
var moo=3;
function pagein()
{
var rc=false;
retrun rc;
}
<!-- end content from virtual chp.js.en -->
<html>
<head>
<style type="text/css">
BODY { font-famliy:Veranda }
.pageheader { font-size:12 }
</style>
<meta http-equiv="pragma" content="no-cache">
<script>
<!-- begin content from virtual /hostinfo/getname -->
var myhostname="This computer is localhost.localdomain";
var myipaddress="127.0.0.1";
<!-- end content from virtual /hostname/getname -->
...
So, what changed in the output buffering between 4.3.8 and 4.3.9? Are
there any settings or coding practices
that would force the virtual calls out in the proper order within a
page? The php4-200501201930 snapshot
with output_buffering=0 seems to work the best, but this new behavior
seems to be a bug. There are similar reports
#30446, #31594, and #30811. Please advise.
Thanks,
JP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php