Possible Duplicate:
Can't pass mysqli connection in session in php
I'm trying to keep an ssh connection alive through the whole browsing process of my php web application. Basically I have a login form, whose parameters (login and passowrd) are passed to the ssh2_auth_password() function. I simply try to have the resource associated to ssh2_connect() stored into $_SESSION, so that it can be used in another web page where the user gets redirected (if connection is succesful). What it happens, instead, is that the ssh connection seems to die just after the login page has been left (i.e. after the redirection takes place). My question is: is there any way to store the handler of an ssh connection into a session variable? If so, can you help me? Thank you so much, Alex