Jump to content

session_start() "kills" page


dough boy

Recommended Posts

Ok...I am having a noob moment.  The site runs fine on one box (via domain), but when I setup the site on another box that uses an IP, the site "spins".  So I started going line by line to figure out why.  When I uncomment out the session_start(), the site loads perfect.  When it is left in, the page just "spins" and nothing is loaded.

 

Am I missing something?

 

Thanks for the help.

Link to comment
https://forums.phpfreaks.com/topic/53878-session_start-kills-page/
Share on other sites

Tried that and still nothing.

 

I wonder if it has something to do with the box I am on.

 

<?php
# If Internet Explorer for exporting purposes need to change the Session Cache
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
		session_cache_limiter("must-revalidate");
}

# Start Session and the Session ID
#session_start();
$_SESSION['id'] = session_id();

# Log user out if requested
if($_GET['logout'] == 'y') {
	@session_destroy();
}
?>

 

Again by removing the # from in front of session_start(); the page spins.  As soon as I remove it, everything works hunky doory.

<?php
session_start(); // have you tried starting it here?
# If Internet Explorer for exporting purposes need to change the Session Cache
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
		session_cache_limiter("must-revalidate");
}

# Start Session and the Session ID
#
$_SESSION['id'] = session_id();

# Log user out if requested
if($_GET['logout'] == 'y') {
	@session_destroy();
}
?>

 

Have you tried starting the session before the cache limiter ???

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.