BIGjuevos Posted January 2, 2007 Share Posted January 2, 2007 How does one save a resource(such as a socket) within a class based object from one script for use within another script which is later executed.OK, before you start asking me questions, let me state what I know:-The PHP website says that you cannot store a resource in a session, which I tried and found out the hard way.-You cannot serialize a resource and store it on the filesystem, tried that too.-I don't know how to do binary operations on the filesystem with PHP.Possible Solutions, which I don't know how to implement-Could I save the class/resource to the file system in it's entirety and be restored later.OK, that's all I have. I have faith in you gurus. So please help this intermediate user out!Thanks in advance,Ryan Link to comment https://forums.phpfreaks.com/topic/32617-get-ready-to-be-puzzled/ Share on other sites More sharing options...
trq Posted January 2, 2007 Share Posted January 2, 2007 My first question has got to be why?My first guess at a solution is that this probbaly isn't possible from within php itself, you may need to create an extension to do so. Link to comment https://forums.phpfreaks.com/topic/32617-get-ready-to-be-puzzled/#findComment-151725 Share on other sites More sharing options...
BIGjuevos Posted January 2, 2007 Author Share Posted January 2, 2007 this is why. http://sourceforge.net/projects/phpeshell/ Link to comment https://forums.phpfreaks.com/topic/32617-get-ready-to-be-puzzled/#findComment-151729 Share on other sites More sharing options...
trq Posted January 2, 2007 Share Posted January 2, 2007 Yeah well sorry, but Im sticking with my guess at a solution. I dont see how it could be done. Still dont really understand why you would need it. Link to comment https://forums.phpfreaks.com/topic/32617-get-ready-to-be-puzzled/#findComment-151731 Share on other sites More sharing options...
BIGjuevos Posted January 2, 2007 Author Share Posted January 2, 2007 I'm using an AJAX implementation which after the client javascript application is loaded, it makes asynchronous requests to the server, which is in fact acting as a relay point to the target server. make sense? Link to comment https://forums.phpfreaks.com/topic/32617-get-ready-to-be-puzzled/#findComment-151734 Share on other sites More sharing options...
trq Posted January 2, 2007 Share Posted January 2, 2007 Sorry, youve still lost me.At any rate, like I said, I think you'd need to write an extension of some kind for this. Im not aware of any way of saving a resource with native php. In fact all resources are thrown out with the garbage so.... Link to comment https://forums.phpfreaks.com/topic/32617-get-ready-to-be-puzzled/#findComment-151741 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.