RE: [PHP] Issue with virtual() calls...

2005-01-24 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 21 January 2005 22:01, Potter, Jeff wrote:

 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?

Sounds like a known bug, which should already be fixed for future versions;
see http://bugs.php.net/bug.php?id=30446 for more details.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Issue with virtual() calls...

2005-01-24 Thread Potter, Jeff
Hi Mike,

I would seem so, but the patch (in snapshot php4-200501201930) only
seems to work when the output_buffering is set to 0.  With
output_buffering set to the default 4096, the virtual() calls are sent
to the browser out of order. The concern with turning the output
buffering off is that the performance will drop off, or there will be an
increase in resource utilization, etc.  The pages and configuration that
are not rendering properly under PHP 4.3.9 have been QA tested without
this issue in PHP 4.3.7 for months, and seem to work fine in PHP 4.3.8.

Any advice or guidance would be appreciated.

Thanks,
JP

-Original Message-
From: Ford, Mike [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 24, 2005 6:40 AM
To: Potter, Jeff; php-general@lists.php.net
Subject: RE: [PHP] Issue with virtual() calls...


To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm



On 21 January 2005 22:01, Potter, Jeff wrote:

 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?

Sounds like a known bug, which should already be fixed for future
versions; see http://bugs.php.net/bug.php?id=30446 for more details.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Headingley Campus,
LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Issue with virtual() calls...

2005-01-24 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 24 January 2005 16:42, Potter, Jeff wrote:

 Hi Mike,
 
 I would seem so, but the patch (in snapshot php4-200501201930) only
 seems to work when the output_buffering is set to 0.  With
 output_buffering set to the default 4096, the virtual() calls are sent
 to the browser out of order. The concern with turning the output
 buffering off is that the performance will drop off, or there
 will be an
 increase in resource utilization, etc.  The pages and
 configuration that
 are not rendering properly under PHP 4.3.9 have been QA tested without
 this issue in PHP 4.3.7 for months, and seem to work fine in
 PHP 4.3.8.
 
 Any advice or guidance would be appreciated.

There's been a fix to the fix today which may or may not have some bearing
on this (I haven't looked at it in detail, and probably wouldn't understand
it if I did!) -- so look for a snapshot dated after about 200501241155.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Issue with virtual() calls...

2005-01-24 Thread Richard Lynch
Potter, Jeff wrote:

 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:

Work-Around:

Until you get this hammered out, you could use file_get_contents() with a
URL instead.

Granted, it's not an Apache sub-request, and it goes in the access_log, so
it's not THE SAME as virtual(), but your HTML output will be correct, at
least...

I'm guessing that performance will suffer slightly, as chewing up a whole
'nother HTTP connection is probably a bit more expensive than a
sub-request...  Or maybe not.  You'll have to test on your server to find
out.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



RE: [PHP] Issue with virtual() calls...

2005-01-24 Thread Potter, Jeff
Mike,

Thanks for the information.  The php4-200501241930 snapshot works much
better...  It looks like Joe Orton's ap_rflush() fix works with output
buffering turned on (output_buffering = 4096).

Regards,
JP

-Original Message-
From: Ford, Mike [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 24, 2005 1:09 PM
To: Potter, Jeff; php-general@lists.php.net
Subject: RE: [PHP] Issue with virtual() calls...


To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm



On 24 January 2005 16:42, Potter, Jeff wrote:

 Hi Mike,
 
 I would seem so, but the patch (in snapshot php4-200501201930) only 
 seems to work when the output_buffering is set to 0.  With 
 output_buffering set to the default 4096, the virtual() calls are sent

 to the browser out of order. The concern with turning the output 
 buffering off is that the performance will drop off, or there will be 
 an increase in resource utilization, etc.  The pages and
 configuration that
 are not rendering properly under PHP 4.3.9 have been QA tested without
 this issue in PHP 4.3.7 for months, and seem to work fine in
 PHP 4.3.8.
 
 Any advice or guidance would be appreciated.

There's been a fix to the fix today which may or may not have some
bearing on this (I haven't looked at it in detail, and probably wouldn't
understand it if I did!) -- so look for a snapshot dated after about
200501241155.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Headingley Campus,
LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



[PHP] Issue with virtual() calls...

2005-01-21 Thread Potter, Jeff
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