Re: [phplib] Object not found From: A.C.N.S. Information and News (infomail <email protected>)
Date: 01/22/01

Sorry for the error but the class I was talking about is the Session class
in the session.inc file. There is no page_open class. page_open is the
function that calls the session class from the included session.inc.

Again sorry for the confusion. hehe. I'm still a bit confused myself.

Chuck

----- Original Message -----
From: "A.C.N.S. Information and News" <infomail <email protected>>
To: "Mauricio Cuenca" <mcuenca <email protected>>; "PHPLib List"
<phplib <email protected>>
Sent: Monday, January 22, 2001 3:57 PM
Subject: Re: [phplib] Object not found

> I've run into the same problem.
>
> It is because of the page_open() command and all being built as classes.
> Which basically boils down to: once you leave the code structure of the
> page_open() command you no longer have access to that class that was
> created.
>
> So, the following would work np.
>
> page_open(array("sess" => "cart_sess"));
> if (!isset($SESSION)) { $SESSION=0; };
> $sess->register("SESSION");
> $sess->purl("store.php3?section=clothing&cat=1");
>
> but the following won't.
>
> page_open(array("sess" => "cart_sess"));
> if (!isset($SESSION)) { $SESSION=0; };
> $sess->register("SESSION");
> function test($section, $cat){
> $sess->purl("store.php3?section=clothing&cat=1");
> };
>
> because the session is no longer able to see the original class. It's all
a
> problem of scope. I'm still trying to work around it myself. hehe. Just
> started with PHPLIB a few days ago, so am still working through it all.
>
> There are others on the list that could help, but, they don't seem to be
> very inclined to. Also, there are a few folks on the list that will help
> where they can np. These are the ones that you place your hope in. hehe.
>
> Anyway sorry for the top post and that I couldn't be of much more help for
> now. Maybe when I get a better grip on the code I'll be able to help
more.
>
> Chuck.
>
> ----- Original Message -----
> From: "Mauricio Cuenca" <mcuenca <email protected>>
> To: "PHPLib List" <phplib <email protected>>
> Sent: Monday, January 22, 2001 2:47 PM
> Subject: [phplib] Object not found
>
>
> > Hello,
> >
> > I'm new on the list, I tried to solve my problem with the archives but
> have
> > no luck.
> >
> > I installed PHPLib and it works almost fine. I'm in hosted site, so I
have
> > no access to the php.ini. The DataBase connection works and the tests
that
> > come with the library also work. But when try to invoke the following
line
> > in my code:
> >
> > <?php $sess->purl("store.php3?section=clothing&cat=1"); ?>
> >
> > I get The following error:
> > Warning: Object sess not found on line XX at /path
> > Fatal error: Member function used on a non-object in /path
> >
> > Con you please help me with this?
> >
> > TIA.
> >
> > Mauricio Cuenca H.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> > For additional commands, e-mail: phplib-help <email protected>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>