Re: Transparent session handling
| From: | Michael Stearne | Date: | Thu, 08 Jun 2000 22:18:03 +0000 |
| Subject: | Re: Transparent session handling | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1339@lists.php.net to get a copy of this message | ||
I was told the difference is negligible, but it it is a big page and takes a long
time to process (10 seconds?) then the user doesn't have anything on the screen
for 10 seconds and gets everything at once. This might be annoying to the user,
but I don't know if performance suffers.
I don't see why cookies or no cookies would matter for output buffering. Why do
you say that?
Michael
Peter Kovacs wrote:
> It is in the database #3304.
>
> How efficient is output buffering compared to non-buffered (well, non PHP
> buffered)?
>
> I suppose I can just enable output buffering if the person is using
> cookies, right?
>
> On Thu, 8 Jun 2000, Michael Stearne wrote:
>
> > This is a bug, please report it, but I've got a workaround for you. You can
> > say:
> >
> > print "<a
> > href=\"http://servername/".$pagename."\">Link
> > label</a>";
> >
> > OR
> >
> > If you use output buffering, the SID is not replaced in the URLs of the page
> > till after PHP is finished processing it like:
> >
> > <?
> > ob_start(); // At top of script
> > ?>
> > http://servername/<? echo $pagename ?>
> >
> > <?
> > ob_end_flush(); /// At bottom of script
> > ?>
> >
> > I assume how the trans-sid works is at the beginning of a script it scans the
> > page for URLs and it adds sid= onto them. After this happened PHP ran your
> > <?echo $pagename;?> command. Or in the other method PHP processes the entire
> > script, and then at the last minute replaces all the URLs with trans-sid.
> >
> > Michael
> >
> >
> > Peter Kovacs wrote:
> >
> > > Transparent session doesn't work with urls like:
> > >
> > > http://servername/<? echo $pagename ?>
> > >
> > > It produces:
> > > http://servername/?sid=something$pagename
> > > instead of :
> > > http://servername/$pagename?sid=something
> > >
> > > I desperately need this fixed and I am will do it myself if somebody could
> > > just point me in the right direction and give a brief explanation of how
> > > the output system works.
> > >
> > > Thanks,
> > > Peter
> > >
> > > --------------------------------------------------
> > > Peter D. Kovacs KnowPost.com LLC
> > > Lead Engineer peter@knowpost.com
> > > --------------------------------------------------
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-general-help@lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
> --------------------------------------------------
> Peter D. Kovacs KnowPost.com LLC
> Lead Engineer peter@knowpost.com
> --------------------------------------------------