From:             [EMAIL PROTECTED]
Operating system: all i guess
PHP version:      4.1.2
PHP Bug Type:     Feature/Change Request
Bug description:  session parameters with trans-sid and no cookies

When cookies are disabled while using sessions+transsid, php adds a hidden
field directly behind the form tag.
This has influence on the document-model of the created site: since all
elements of the form can be adressed via javascript using an array (e.g.
forms[0].elements[0]), the newly created hidden field shifts all members
of the array by one point.
This can cause off-by-one errors when accessing the array with direct
addresses, resulting in strange behaviours on the client (wrong line of
data used etc) - only with cookies disabled.

Of course, there are other possibilities in adressing the elements, but
there are some solutions that would ease the problem and stop php
preventing the user from using one method of adressing the elements:
- put the hidden field right before the end-form tag (bad solution, object
model is still affected, but additional elements at the end obviously
cause less problems...)
- don't put the hidden field if the user manually uses SID in the form,
e.g. in the action of the formtag (better solution, enabels advanced users
to control how the object model is affected)

i think a combination of both methods would increase some inexperienced
users sites (that never test their site without cookies) and experienced
users can control the functionality.
-- 
Edit bug report at http://bugs.php.net/?id=17460&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17460&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17460&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17460&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17460&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17460&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17460&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17460&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17460&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17460&r=globals

Reply via email to