To solve session start Problem while debugging: I think I figured out why Session_start() does not reload the current session data after loading a page in debug mode. Normally, I set session.referer_check as follows at the start of the script:
//Force PHP to check referrer
ini_set('session.referer_check', 'www.domain.com');
|
In debug, the referer URL is not the same! So without debug, session_start() restores session data normally, but it does not in debug because the host is now something like 'localhost:8080'. Using the following seem to solve the problem:
//Force PHP to check referer when not in debug mode
If (!isset($_COOKIE['DBGSESSID'])) ini_set('session.referer_check', 'www.domain.com');
|
This is a quick-and-dirty work around. Any suggestion for a better solution will be most welcomed.