Can imap resource returned by imap_open be serialized?
I get an error “expects parameter 1 to be resource, integer given” when unserialize.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. As per the documentation: “serialize() handles all types, except the resource-type.”
Think about it. serialize can only handle what’s physically stored within the PHP process. All the server-side state, login data, etc… is lost when the connection is closed. Even if the client-side data is serialized, the server will forget the connection existed, and upon un-serializing, the client’ll go “hey buddy, remember me?” and the server will go “no”.