Re: [PHP4BETA] PHP4b3 trans-sid doesn't parse URLs HREF=# or FORM...ACTION=

From: Date: Tue, 15 Feb 2000 11:14:29 +0000
Subject: Re: [PHP4BETA] PHP4b3 trans-sid doesn't parse URLs HREF=# or FORM...ACTION=
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-10291@lists.php.net to get a copy of this message
Hi, we had the same problem. Putting double quotes around the html tag help, i.e. <FORM ... ACTION="filename.php3?bla=blub"> Cheers Juergen On Mon, Feb 14, 2000 at 11:37:35PM -0500, Chris Shenton wrote: > [should this be filed with the bug reporter gadget instead of here?] > > Been making use of PHP4b3's session tracking features, and loving it. > Now when I turn off cookies in the browser, to see how some of our > users will experience it, some things break. Specifically, I've found > that neither HTML references of the form > > <A HREF=#label> > > nor > > <FORM ... ACTION=filename.php?Variable=Value> > > get parsed. I did the config to turn on the trans-sid: > > # ./configure --with-apache=../apache_1.3.11 > --with-mysql > --enable-trans-sid > --enable-track-vars > > and it does translate most the URLs on the fly (cool!). But I'm having > to do contortions to get the others to work. Commented sample code > fragments follow for each case description. > > > Below, I had to change relative HTML label finding from > > <A HREF=#label> > > to > > <A HREF=$PHP_SELF?Variable=Value#label> > > to get the SID expansion to work. Just using HREF=$PHP_SELF?#label > failed. > > // "#"-style references don't get parsed correctly by PHP: > // <a href=#Files>Manage Files</a> > // becomes > // <a href=?PHPSESSID=2e408032c0bc0882fe1fdaa7edd96791#Files>Manage Files</a> > > echo "<P ALIGN=CENTER> > <a href=$PHP_SELF?Function=Nop#Files>Manage Files</a> > | <a href=$PHP_SELF?Function=Nop#Addresses>Manage Recipients</a> > | <a href=$PHP_SELF?Function=Nop#ChangePassword>Change Password</a> > | <a href=$PHP_SELF?Function=Nop#UsernameChange>Change Username</a> > | <a href=logout.php>LogOut</a>"; > > This is kind of ugly because instead of directing the browser to > scroll to find the label, it causes the browser to go back to the > server again; much slower. > > > > For forms like below, I found that I had to replace styles like: > > <FORM ... ACTION=filename.php?Variable=Value> > > with a variant with the SID constant appended as an extra variable: > > <FORM ... ACTION=filename.php?Variable=Value> > > Code sample: > > // The SUBMIT buttons don't get the URL parsed to add the SESSIONID info: > // <FORM METHOD=POST ENCTYPE=multipart/form-data > // ACTION=filename.php?Function=FileUpload> > // Is this because they don't have an HREF= for PHP to find and parse? > // Workaround: jam the session ID constant; what if we do allow cookies?? > > echo "<FORM METHOD=POST ENCTYPE=multipart/form-data > ACTION=$PHP_SELF?Function=FileUpload&". SID .">" > > > Are there better work arounds for this? Would writing the URLs in the > relative-label or FORM...ACTION statements different allow the parser > to notice these? > > Thanks. > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net

« previous php.version4 (#10291) next »