It can be startin a new session on each page. Are you using some header("Location: ???"); ? If so, it could be starting a new session. ""deinet"" <lista_php@xxxxxxxxxx> escreveu na mensagem news:0A.97.01582.D4F4E954@xxxxxxxxxxxxxxx > Hi, thank you chucre, but this not is the solution, the session.auto_start > is On, I don't need use session_start() because it is automatic. > > This is my script: > > <? > > include_once 'usuario.class.php'; > > include_once 'carrito.class.php'; > > //session_start(); > > if (!session_id()) > > { > > session_start(); > > } > > if (!isset($_SESSION["ocarrito"])){ > > $_SESSION["ocarrito"] = new carrito(); > > } > > > > if (!isset($_SESSION["elusuario"])){ > > $_SESSION["elusuario"] = new usuario(); > > } > > ?> > > for your class work, is necessary verify the session_id, like this: > > if (!session_id()) > session_start(); > > > > 2007/1/5, deinet < <mailto:lista_php@xxxxxxxxxx> lista_php@xxxxxxxxxx>: > > Hello list, i have a problem with sessions and class. I used to work with > a > server with session.auto_start=Off, and now I had to move all my sites to > another server with session.auto_start=On, and I have this problem with > the > session: > > > > Fatal error: Unknown(): The script tried to execute a method or access a > property of an incomplete object. Please ensure that the class definition > carrito of the object you are trying to operate on was loaded _before_ the > session was started in <archive> on line 43 > > > > The problem is the class is charged after the beginning of the session, > but > I don't know what to do to make it work, please help me. > > > > P.D.: To put the session.auto_start in Off is not a solution because the > servers administrators don't admit that. > > > > I hope you will understand my problem, sorry for my english. > > > > Thank you very much, Carlos. > > > > > -- > Fernando Chure > PSL/CE > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php