PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
PEAR::DB woes

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database
View previous topic :: View next topic  
Author Message
visage



Joined: 05 Mar 2008
Posts: 1
Location: Toledo, OH

PostPosted: Wed Mar 05, 2008 6:16 am    Post subject: PEAR::DB woes Reply with quote

Hey all. I'm having a strange problem with the old PEAR::DB extension.

I can get a valid database connection object, but whenever I try to run queries, I get an error result object saying "DB: No database selected", even though I've clearly got one selected as part of the DSN.

I've got some output which I'll link to below from pastebin, rather than clogging up space here.

The first bit is output from the DB object, the lower part is output from a simple query string result object.

Can someone tell me what I'm doing wrong, as this is driving me nuts.

Unfortunately, the host is not mine, but a client's, and they don't support MDB2 on it.

http://pastebin.ca/928556

Many thanks.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1011

PostPosted: Wed Mar 05, 2008 10:27 am    Post subject: Re: PEAR::DB woes Reply with quote

visage wrote:
I can get a valid database connection object, but whenever I try to run queries, I get an error result object saying "DB: No database selected", even though I've clearly got one selected as part of the DSN.


Maybe a problem with the include_path, causing DB not being able to find its files? The following lines might help to find the problem (insert them at the start of your script):

Code:

error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);


visage wrote:
Unfortunately, the host is not mine, but a client's, and they don't support MDB2 on it.


You can always install PEAR and every package yourself, there is no need to rely on your host.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software