Re: PHP 4.0 Bug #5152: Object passed in a session generates errors when member functions are called

From: Date: Thu, 22 Jun 2000 08:36:29 +0000
Subject: Re: PHP 4.0 Bug #5152: Object passed in a session generates errors when member functions are called
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-21947@lists.php.net to get a copy of this message
S>> Because PHP doesn't seem to work. I looked at the loading code, contrary S>> to what you may think, from CVS. I see only two cases are real: 1. You have a bug here (not related to objects' handling) and you are bit by it. 2. You insist on using it the wrong way (not defining class but trying to use it and objects of the class). If you interested in seeing the solution, please provide your code (snippets) and you'll definitely get the advice how to make it work. If you interested in bashing PHP because it isn't built the way you wanted, you are welcome to do it on alt.php.sucks.sucks.sucks, but not here. PHP sessions do work. If they don't work they way you like, I think everybody here will be ready to discuss, explain and even adjust. S>> Why not just NOT auto-load classes, and if you want access to a class, you S>> NEW it and then say session_load_object("type", &var) or something? S>> Or have the session_load_object("type") just allocate for you? Classes can not be "auto-loaded". At least, not now. For this you need to build entire system that would know which class is where and entire system in PHP that would ask you to lad this classes. I do not see a need of such a system. Though, if you like it, you could implement loading classes on-demand and hook it to sessions. I just think it would be rather sloooooow. But if you want it so bad, do it. If your idea is not what you see, please explain it cleanly. What should session_load_object do? S>> I'd like to see the object-session model change. If no one else will do S>> it, I will. You're welcome. You are also welcome to read list messages and see if Sacha or mine proposals will be OK for you. -- Stanislav Malyshev stas@zend.com +972-3-6139665

« previous php.dev (#21947) next »