session-start

How does session_start lock in PHP?

Originally, I just want to verify that session_start locks on session. So, I create a PHP file as below. Basically, if the pageview is even, the page sleeps for 10 seconds; if the pageview is odd, it doesn't. And, session_start is used to obtain the page view in $_SESSION. I tried to access the page in two tabs of one browser. It is not...

Session_Start, IIS7 and constant session resets

I have been using Session_Start to make database transactions as a way of tracking server activity. We recently migrated to a new server with IIS7 and suddenly some of our most active sites seem to be abandoning/restarting sessions constantly with the same session ID each time. This is of course wildly inflating our access counts and b...

[PHP] session_start Throws Fatal Error

I'm currently working on a small CMS for my website and I'm getting following error when calling session_start() : Fatal error: Exception thrown without a stack frame in Unknown on line 0 I'm storing the PDO database connection in the $_SESSION, so I need to call session_start() directly after starting up the script. Here's a snip...

PHP session_start() does not set $_SESSION at all

Hi, I have the following identical code on my development and production server. It works on the development end, but not on the production side: <?php $s = session_start(); mail('[email protected]', 'Site-test', "s=$s; SESSION=".serialize($_SESSION), "MIME..."); Development server shows: s=1; SESSION=a:4:{s:20:"user_timezone_region";s...

What code whould be placed in the application_start and the session_start events in global.asax?

Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines? I know when each subroutine is called. Application_Start when the first user first accesses the web application. Session_Start when a user opens a session with the application. But what code belongs in each of these subr...