ID:               27480
 Comment by:       pjurenc at quorum dot pl
 Reported By:      ricardo at aganp dot go dot gov dot br
 Status:           Bogus
 Bug Type:         Session related
 Operating System: SUSE 8
 PHP Version:      Irrelevant
 New Comment:

Continuing my problem, I thought it would be helpfull include some of
my scripts. The problem is with last quoted script forgotpass.php. The
one which is not displayed unles refresh is done in browser. After
removing line with session_starts() page is displayed. 

---- file: index.php
<?
session_start();
$_SESSION["sitevisitor"]="ok";

/* some scripting, HTML code */

<a href="javascript;"
onClick="window.open('login.php',....);">Login</a>

/* some scripting, HTML code */
?>

---- file: login.php
<?
session_start();
if(!isset($_SESSION["sitevisitor"]) || $_SESSION["sitevisitor"]<>"ok")
die('Access deni');

/* some scripting, HTML code */

/* both links below open in current active window, same as login.php
was */
<a href="forgotpass.php">Forgot password ?</a>
<a href="regnewuser.php">Register a new user? </a>

/* some scripting, HTML code */
?>

---- file: forgotpass.php, the script I've got the problem displaying
<?
session_start();
if(!isset($_SESSION["sitevisitor"]) || $_SESSION["sitevisitor"]<>"ok")
die('Access deni');
/* some scripting */
echo "this text is displayed";
?>
<HTML>
....
<BODY>
nothing from here is displayed unless Refresh is done in WebBrowser
Whats more, the WebBrowser's location/address bar contains the old
index.php URL
</BODY>


Previous Comments:
------------------------------------------------------------------------

[2004-05-16 00:29:50] pjurenc at quorum dot pl

Seems I've got the same problem as Ricardo. Each time I load the page
(including session_start() at the top of the script) for the first
time, I need to refresh it. When I remove session_start() it works
fine. The PHP version is 4.3.6 (on ver 4.1.1 it works fine).
What is strange: having 2 very similar script one works, another
doesn't. What I found while trying to resolve the problem: outputs by
command like echo "test" work but an ordinary HTML code doesn't. I need
to solve this as soon as possible.

------------------------------------------------------------------------

[2004-04-08 11:07:57] [EMAIL PROTECTED]

Too old PHP version. (and sessions work just fine with properly setup
system and correct PHP code/logic)


------------------------------------------------------------------------

[2004-03-29 14:41:38] ricardo at aganp dot go dot gov dot br

I'm not using ob_gzhandler. In php.ini output_buffering is set to "no
value" "no value". I put session_start() before <html><head>. Is the
first command on the page.

------------------------------------------------------------------------

[2004-03-29 04:40:13] unknown at simplemachines dot org

I believe this is bogus.  I've seen this problem before, and it has to
do with output buffering.

This will ALWAYS happen if you choose to start ob_gzhandler after
session_start().  Instead, session_start() should be called afterward.

Why?  It's actually quite simple.  Since session_start() sends headers,
it messes with output buffering... and makes it so that gzipped output
is not sent to the client properly.

Are you absolutely sure you're not using any output buffering - whether
in php.ini or in your scripts?

-[Unknown]

------------------------------------------------------------------------

[2004-03-23 15:15:39] ricardo at aganp dot go dot gov dot br

I did not decide the problem yeat. Can anyone help me?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/27480

-- 
Edit this bug report at http://bugs.php.net/?id=27480&edit=1

Reply via email to