tags:

views:

124

answers:

4

Totally confused by this one...

We have a WAMPServer installation set up, running a number of virtual hosts from various document roots.

Just recently, one particular domain has started hanging the server. We traced it down to session_start(). If we comment it out, there are no problems (except, of course, for the fact that we can't do anything with the session). With it uncommented, it will hang the page load and, with enough reloads, will hang the entire server.

All of the other sites still work perfectly with their sessions. As far as I know, there is nothing different with the way sessions are being worked with. I am looking further into it (in case someone changed something) but right now I'm hoping for some direction :)

So, any thoughts?

A: 

My first guess would be file permissions if you are using file based sessions. If you are using database sessions, then I would check to make sure a table isn't corrupt. Also, is it Apache, PHP or something else that's locked up?

Darryl Hein
A: 

So, I'm guessing that it's an application layer problem because the other sites' sessions are working properly. However, this assumes that they have their sessions configured the same way - save yourself some time by double checking that your site isn't doing some "unique" in its configuration compared to the other sites.

I would next examine the other session related code that is running in your application. It could be that by calling session_start() you're putting your application into a state where it will run other code. For example, maybe there's a block of code that says "only run this function if this session variable is set" and by starting the session you're exposing that variable, where it wouldn't have been exposed and therefore not run the offending function if the session wasn't started.

Good luck.

Sam Bisbee
You are totally correct in that enabling the session caused a session variable to exist somewhere else and from there, that variable was what was eventually the problem... thanks for the comment as it pushed my brain around a little!
Narcissus
Awesome - glad to hear that I helped. :-)
Sam Bisbee
A: 

It's possible that you hit a bug in your underlying infrastructure that you won't be able to resolve. You should at least clear all existing sessions before moving forward with trying to diagnose this.

dkamins
A: 

Do you have session.use_trans_sid = 1 in your php.ini? bug #22154

Jep