|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-16 18:59 UTC] webmaster at rosenkeller dot org
Hi, I've just stumbled across this problem: I have a few pages which all include one file that does some functionality needed for session management. Now I have a problem in one of these pages (the other ones seem to work): the output from the included file is not completely output before the "including" script continues; instead, I have something like this: ### output from include() ### rest of the "including" file ### output from include() (remaining portion). In short, the last thing the included file should output is "</table>". But I get everything until "</", then the output from the including file, then "table>". In "long": I have put the concerned scripts at https://members.rosenkeller.org/phpbug/ The file "logout.php" includes "session.php". The corresponding "logout-src.php" and "session-src.php" simply show the source code of the respective file; I have also included phpinfo.php which shows the results of phpinfo(). If you have a look at the HTML source that output.php produces, you should see what I mean (the "warning: undefined variable" is normal, because there is no session). I think that this is a bug; if I overlooked something instead (maybe some configuration option?) I'd be pleased to hear what it is... Thank you in advance, and keep the great work up! :-) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 04:00:02 2025 UTC |
Hi, this actually _is_ a bug :-) The minimalistic case: you have 2 files: #a.php <?php session_start();?>123<!-- hello --> #b.php <?php include("a.php"); session_destroy(); ?>456 The output should be "123<!-- hello -->456", right? But it is "123<!456 -- hello -->". The same thing happens when using require(). When leaving out the session_destroy() or putting it at the very end of b.php, everything works as expected. Please check this if you can. Best regards, Chris