PHP会话和类

I feel like a big noob. Okay in PHP i am a noob but thats another story. I am a bid confused. I wrote a ticket system for a smaller company and it works well. There is just 1 problem with my session variables.

define('bin', 'bin/');//just the path to my binaries
session_name('ticket');

require_once bin.'constants.php'; //definition of all necessary constants
require_once bin.'class.php';   //Load all class files
$boolsession = session_start();
require_once bin.'handle.php'; //execute all incomming data
require_once bin.'webcontent.php'; //output the result. 

And here is my Problem. When i start the Session BEFORE i include my class files there are some variables wich just dont work anymore. when is start her after like this there is just 1 variable wich dont be startet anymore.

It's my user variable wich refers to my user data. after I logged in it write my session i insert the data out of my name user in a variable and write it into my session.

$_SESSION['user'] = $user;

But when i process more data my 'user' wont worke anymore. Var dump shows me that user is incomplete

somehow like this

object(__PHP_Incomplete_Class)#1 (5) { ["__PHP_Incomplete_Class_Name"]=> string(4) "user"

Sorry for my bad english skills and very thanks when you are able to help me

You indeed must include your class files before you start the session. Unserialising objects from session needs the source-files of the classes.