> -----Original Message-----
> From: Valantis Kamayiannis [mailto:[EMAIL PROTECTED]]
> Sent: 24 September 2002 12:37
> 
> I made a class called OracleCon that is used to connect to an 
> Oracle server
> and provide some certain queries to the database
> When i create an object of that class and serialize it to add it to a
> cookie, if i echo the $object->connection attribute i get a 
> "Resource id #2"
> 
> When after redirection due to succefull login, i need to use 
> this object to
> run the queries i get an error like this:
> 
> Warning: ociparse(): supplied argument is not a valid OCI8-Connection
> resource in c:\program files\apache 
> group\apache\htdocs\php\OracleCon.inc on
> line 66
> 
> What is wrong with this?

You can't carry a connection resource from one page to another -- you have
to script an OCILogon (or OCIPLogon) in every page that needs to access your
database.  (This is true not just for Oracle -- all the databases supported
in PHP that I've looked at work the same way.)

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to