|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-07-27 13:14 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 09:00:01 2025 UTC |
If you try session_remember()ing a variable that contains a resource, for instance one that you acquired via pfsockopen(), the value will be mangled, and the resource will become unavailable. For instance: <? session_start(); echo gettype($socket),"<br>"; if (!$socket) { $socket = fsockopen("www.php.net", 80); session_register("socket"); } echo gettype($socket),"<br>"; ?> The second time you visit the page, the output is "integer<br>resource". It pretty much tells me that my resource gets saved as an integer, and then nobody remebers to turn it back into a resource again :( Can this be done? Am I thinking in the wrong direction if I need file descriptor persistance?