getMessage(); } restore_error_handler(); // Now output everything $output[] = "save_handler_before=" . $saveHandlerBefore; $output[] = "SESSION_START_RESULT=" . ($result ? "true" : "false"); if ($error) { $output[] = "ERROR:" . $error; } if ($exception) { $output[] = "EXCEPTION:" . $exception; } break; case 'just_start': // Simple session start without any custom handler // This should always work session_id('test-session-id-3'); session_start(); $_SESSION['test'] = 'value'; session_write_close(); $output[] = "SESSION_STARTED_OK"; break; default: $output[] = "UNKNOWN_ACTION"; } echo implode("\n", $output); };