Re: Transparent session handling
| From: | Michael Stearne | Date: | Thu, 08 Jun 2000 21:41:31 +0000 |
| Subject: | Re: Transparent session handling | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1334@lists.php.net to get a copy of this message | ||
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