tags:

views:

57

answers:

1

I have an application I've written in PHP from scratch. I'm using PHP's native session handler functions for handling user authentication and persistence.

When testing on the development server, everything is peachy. Authentication, persistence, etc, works fine.

When installed on the production server, everything works fine up until the user authentication -- when the app actually writes data to the session object, suddenly the HTTP request that follows it completely hangs exactly when session_start() is executed.

I suspected the temporary session files were being locked by PHP and never released, so I tried following up the spots where the app is writing to the session object with session_write_close(), but that didn't seem to have any effect.

Does this sound like a file lock issue or is this something else? I'm confused on why session_write_close doesn't seem to be taking care of the file lock issue if that's the case, which is why I'm wondering if there could be something else at play here.

Any possible thoughts or ideas?

Reply to Pekka's great suggestions:

  • The production server is a linux environment. phpinfo reports Linux wynn 2.6.18-164.9.1.el5PAE #1 SMP
  • The page is not calling itself
  • I can read/write the session folder and files. I can see the authentication data that gets serialized into the files from the auth attempt.
+1  A: 

Just a few ideas - in addition to pygorex's comment to first turn up the error_reporting, which should definitely come first.

Pekka
Marking this as correct - turns out it wasn't a session problem afterall, but these solutions gave me enough places to debug that I could entirely rule-out a session issue. Thank you.
Andy Baird

related questions