There is a typo there in functions name. It is called "session_open" not "open_session", but everything else is as described