Hi all,
Confusing problem here. I have a web app which uses the PHP session handler. When a user first comes to the site, a method which attempts to build a user profile based on the session information is called (after session_start()). If no session info is found then the system calls session_unset() and session_destroy() and throws a login page. I think I have tracked the bug down to the fact that calling session_unset() on an empty session causes a segfault on PHP 4.1.*/Apache. However I have not got a workaround. Anyone else get/solved this problem?
im a bit confused if there is no session info found why are u calling session_unset() and session_destroy()?
session_destroy makes sense, since you're calling session_start, and it will create a blank session anyway, but yeah, if you have no session variables, why use session_unset?
Not sure if it's necessary actually, just to ensure that a blank session is there when the login part comes to write session vars. Removing the offending code doesn't cause any problems. It's an interesting bug though 🙂