I think this question was answered by Stewart Taylor earlier today. Here is
his response:

"
This error occurrs when you start a session that recreates an object
variable but does not know the class definition for it.
You need to make sure you include the class source before you start the
session.
"

Kirk

> -----Original Message-----
> From: Rodrigo Reis da Rocha [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 10, 2001 11:44 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Please help
> 
> 
> Hi,
> I have a problem with the session variables.
> 
> <?
> 
> 
> class Autorizacao
> {
>  
> //Atributos---------------------------------------------------
> ----------------------------
>  var $nome_usuario;
>  var $webmaster_mail;
>  var $acao;
>  var $url_sistema;
> 
>  
> //Métodos-----------------------------------------------------
> ----------------------------
>  function Autorizacao(){
>   $this->nome_usuario = "vazio";
>   $this->webmaster_mail = "[EMAIL PROTECTED]";
>   $this->acao = "inicio";
>   $this->url_sistema = "http://localhost/web/ ";
>  }
> 
>  function autorizaSistema($param_usuario, $param_passwd){
>   //Verificar no banco se o usuario existe
>   $this->nome_usuario = $param_usuario;
>  }
> }
> 
> 
> session_start();
> 
> if (!session_is_registered("SISTEMA")){
> 
>  //Registra a sessao
>  session_register("SISTEMA");
>  $GLOBALS["SISTEMA"] = new Autorizacao();
>  echo "Seta sistema";
> 
> }
> 
> echo $GLOBALS["SISTEMA"]->url_sistema;
> 
> echo "teste";
> 
> echo "<A href='in2.php'>reload</A>";
> ?>
> 
> at the secons time that this code is executed generate this error.
> 
> Fatal error: The script tried to execute a method or access a 
> property of an incomplete object. Please ensure that the 
> class definition autorizacao of the object you are trying to 
> operate on was loaded _before_ the session was started in 
> C:/XITAMI/webpages/WEB/in2.php on line 38
> 
> Please help
> 
> Tkx.
> R3.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to