PHPSESSID appended completely wrong with session.use_trans_sid enabled
am 20.08.2009 17:11:03 von klaus triendlHi,
it seems to me that I've hit a bug related to the session.use_trans_sid
feature when output buffering (output_buffer) is on and configured to be
less than the content-size sent to the browser.
A self-made template system produces a php script as a string which gets
then eval'd. The produced script contains many 'echo' directives and
if-statements that evaluate conditions fed by the template system.
It is sometimes necessary to conditionally output parameters in an url
of a link (html anchor). So, instead of echo'ing the whole link at once
it gets written to the output with 'echo' 3 or more times.
E.g.
echo 'link text
Now, it happens sometimes that the session ID is appended completely
wrong after the quote closing the 'href' attribute but before the
tag-closing '>':
href="editfilingcard.m-box?action=modify&fcardid=3067&am p;belongs2fcard=1411&setmgrname=mboxobj"?PHPSESSID=f0hri ua92m1oe6hmn47upm8n34>
Interestingly, links before or after the one mentioned here aren't
affected in my scenario.
Also, removing enough characters from the output before the link,
everything works fine; and if I increase the output buffer from the
default (4096) to 8192 (which is more than the content-size in my
scenario) everything is fine, too.
I assume, due to my tests, that output buffering somehow interferes
badly with automatically inserting the session ID.
I'm using php-5.2.10 on windows together with apache and IIS.
Any help is welcome, I can provide a script reproducing the problem.
Klaus Triendl
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php