[PHP] Objects and sessions

2004-12-09 Thread Francisco M. Marzoa Alonso
Following code: ?php class SessionTestC { protected $value; function __construct ( $val ) { $this-value = $val; } function GetValue () { return $this-value; } } if ( isset ($_SESSION['TestObj'])) { echo 'Session Test is set to:

[PHP] [SOLUTION] Re: [PHP] Objects and sessions

2004-12-09 Thread Francisco M. Marzoa Alonso
Thomas Munz wrote: I think, its not possible to init an Objeect on a session. Yes, it can. The problem was with serialization. With session.auto_start set to 1 on php.ini, seems like session's objects are unserialized before loading the script, so the class is not loaded when the session

Re: [PHP] Objects and sessions

2004-12-09 Thread Thomas Munz
I think, its not possible to init an Objeect on a session. Session will be rebuild on each reload of the site based on the session id, i think... Maybe here the object can't be rebuild anymore... Following code: ?php class SessionTestC { protected $value; function __construct (

[PHP] objects in sessions again

2004-04-21 Thread daniel
Hi there, needing some more advise, is this function correct ? function create_object($class_name,$dir = null, $serialize = null) { $dir ? $dir = $dir./ : $dir = ; require_once(.CLASS_PATH.$dir.$class_name..php); if

[PHP] objects in sessions.

2002-02-27 Thread Aric Caley
If you register an object as a session variable, do you need to include the objects class *before* start_session()? What if I use serialize() on my object, and then register a variable with the serialized data; then I can start_session(), do some other things, then include the class definition,

Re: [PHP] Objects and sessions

2001-11-27 Thread Tamas Arpad
On Monday 26 November 2001 23:37, Christopher William Wesley wrote: On Mon, 26 Nov 2001, Greg Sidelinger wrote: Can someone tell me how to store a class in a session var. I want to There are several things you need to do. 1) include the class definition before you do anything 2) start

[PHP] Objects and sessions

2001-11-26 Thread Greg Sidelinger
Can someone tell me how to store a class in a session var. I want to test to see if it has been defined and if not create it. I'm having problems with it right now. This is what I'm trying currently ? Class a { var $temp; function a() {

Re: [PHP] Objects and sessions

2001-11-26 Thread Tamas Arpad
later on I get errors about the class functions being undefined. Can anyone please point me in the right direction on how to register my objects as session vars. Class definition *must* be before any session_start() or sessgion_register() if there are previously stored objects in the

Re: [PHP] Objects and sessions

2001-11-26 Thread Christopher William Wesley
On Mon, 26 Nov 2001, Greg Sidelinger wrote: Can someone tell me how to store a class in a session var. I want to There are several things you need to do. 1) include the class definition before you do anything 2) start the session shortly thereafter 3) register a session variable 4) create

Re: [PHP] Objects and sessions

2001-07-03 Thread Brad Hubbard
On Tue, 3 Jul 2001 11:47, Ethan Schroeder wrote: If what you mean is if PHP sessions can register objects, that is true and quite effective. Can you elaborate on this Ethan so I'm sure I understand what you're saying. Cheers, Brad -- PHP General Mailing List (http://www.php.net

[PHP] Objects and sessions

2001-07-02 Thread Brandon Orther
Hello, I was informed by someone that is a blatent liar and regulary makes things up that PHP session can handle Objects. Is this true? Thank you, Brandon Orther

Re: [PHP] Objects and sessions

2001-07-02 Thread Ethan Schroeder
If what you mean is if PHP sessions can register objects, that is true and quite effective. Ethan Schroeder - Original Message - From: Brandon Orther [EMAIL PROTECTED] To: PHP User Group [EMAIL PROTECTED] Sent: Monday, July 02, 2001 4:36 PM Subject: [PHP] Objects and sessions Hello