RE: [PEAR] Database connection problem
| From: | Mike Carter | Date: | Thu, 19 Dec 2002 10:39:40 +0000 |
| Subject: | RE: [PEAR] Database connection problem | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3046@lists.php.net to get a copy of this message | ||
Hi,
The DataObject does work fine - but under certain circumstances there's
this problem where the DataObject isn't picking up the .ini file
containing the DSN.
The process of getting some data involves 2 steps.
We have a business logic style class which contains methods related to
my database table. In the method I create an instance of the relevant
DataObject, build up a query and call the find() method of the
DataObject.
The DataObjects inherit from a small general class I created, the
constructor in this class is responsible for the reading of the
database.ini file and setting of $options as detailed in the DataObjects
documentation. This small class then extends the standard
PEAR::DB_DataObject class.
The above all works fine - but if we then call the business logic method
from another class (which just happens to be a SOAP server web method)
the problem of the DataObject not having the DSN (which I guess means it
has lost the access to the $options array?) occurs.
Hope the above is explained well enough... Feel the need to sleep.
Thanks in advance,
Mike
> -----Original Message-----
> From: Lukas Smith [mailto:smith@dybnet.de]
>
> Whats your DSN you are trying to connect with?
>
>
> Lukas Smith
> smith@dybnet.de
> _______________________________
> DybNet Internet Solutions GbR
> Reuchlinstr. 10-11
> Gebäude 4 1.OG Raum 6 (4.1.6)
> 10553 Berlin
> Germany
> Tel. : +49 30 83 22 50 00
> Fax : +49 30 83 22 50 07
> www.dybnet.de info@dybnet.de
>
> > -----Original Message-----
> > From: Steve Fisk [mailto:steve.fisk@koa.uk.com]
> >
> > Getting a confusing error - anyone understand? Has it
> happened to you
> > too?
> >
> > "DB Error: not found";s:8:"userinfo";s:41:"Unable to include the
> DB/.php
> > file for `'";s:8:"callback";N;}}
> >
> > The DB/ .php is the wrong filename - because there isn't
> one - we know
> > that something isn't being included that should be but
> don't know why