473,394 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

PEAR DB

Hey All,

When I have
DB.php (PEAR)
in the root directory of my project it works ok using
require "DB.php";

When I put it in a seperate folder and call it using
require "classes/DB.php";

i get the following errors:

Warning: Problem with method call - please report this bug in /
home/..../DB.php on line 520
Warning: Problem with method call - please report this bug in /
home/..../DB.php on line 543

Apr 12 '07 #1
4 2721
andy wrote:
Warning: Problem with method call - please report this bug in /
home/..../DB.php on line 520
Warning: Problem with method call - please report this bug in /
home/..../DB.php on line 543
What is on those lines?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 13 '07 #2
This is the PEAR DB.php

520: $dsninfo = DB::parseDSN($dsn);
....
540: $tmp = PEAR::raiseError(null, DB_ERROR_NOT_FOUND, null, null,
541: "Unable to include the DB/{$type}.php"
542: . " file for '$dsn'",
543: 'DB_Error', true);
On 13 Apr, 10:02, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
andy wrote:
Warning: Problem with method call - please report this bug in /
home/..../DB.php on line 520
Warning: Problem with method call - please report this bug in /
home/..../DB.php on line 543

What is on those lines?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Apr 16 '07 #3
andy wrote:
520: $dsninfo = DB::parseDSN($dsn);
...
540: $tmp = PEAR::raiseError(null, DB_ERROR_NOT_FOUND, null, null,
541: "Unable to include the DB/{$type}.php"
542: . " file for '$dsn'",
543: 'DB_Error', true);
Both of those look fairly innocuous, so I'm guessing the error is
elsewhere.

Firstly, do you have you made sure that PEAR DB supports your version of
PHP?

Secondly, try turning on all error reporting (error_reporting(E_ALL)) and
see if any more interesting errors show up -- I'm guessing there might be
something about being unable to include a particular file.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 16 '07 #4
Yes it supports the database, I have two version of the php script i
am writing, same server, same account etc.

The only differance is the way DB.php is stored.

one is in the root directory
include "DB.php";

one is in a sub directory

include "pear/DB.php";

On 16 Apr, 08:28, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
andy wrote:
520: $dsninfo = DB::parseDSN($dsn);
...
540: $tmp = PEAR::raiseError(null, DB_ERROR_NOT_FOUND, null, null,
541: "Unable to include the DB/{$type}.php"
542: . " file for '$dsn'",
543: 'DB_Error', true);

Both of those look fairly innocuous, so I'm guessing the error is
elsewhere.

Firstly, do you have you made sure that PEAR DB supports your version of
PHP?

Secondly, try turning on all error reporting (error_reporting(E_ALL)) and
see if any more interesting errors show up -- I'm guessing there might be
something about being unable to include a particular file.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Apr 16 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Sandro Dentella | last post by:
I need to use a class to handle mbox files that uses PEAR. Since I'm using Debian (both woody and, I simply apt-get(ed) php4-pear but I can't use it becouse I get the error: Warning: dl():...
3
by: junkmail | last post by:
on a win 2k server apparantly it is saying i dont have it. or it cant find it. im using mySQL 4.1 php 4.3.x apache 3.0.53 im new to php and am doing some tutorials, but when i run the sripts...
1
by: DJ Majestik | last post by:
OK, I am new to the whole PEAR/Smarty templating thing. I am trying to setup my directory structure correctly. If someone could weigh in and see if I have this setup "right", I would appreciate it....
3
by: David | last post by:
I installed the Pear program and set the include path in php.ini to point to the pear dir. I have a program which <? require_once("DB.php"); ?> This produces the error "Class 'PEAR_Error'...
2
by: Alan Prescott | last post by:
I'm running SuSE Linux 9.3, fully up to date running # pear install db responds with ... downloading DB-1.7.6.tgz ... Starting to download DB-1.7.6.tgz (124,807 bytes)...
5
by: Jim Michaels | last post by:
I downloaded a PEAR module, but it came with this XML file and a PHP file. I figure I just include the PHP file somehow, but what do I do with the XML file?
0
by: bwhitehd | last post by:
I'm having a problem installing php. The compile seems to go fine, but when it gets to the install step I get the following errors. Does anyone have an idea of what might be the problem? We...
1
by: IchBin | last post by:
I am new to PHP and I am running on Windoze XP SP 2. Just noticed that the PEAR installed dir structure I have (to DB subdir) is : C:\php5.2\PEAR\pear\DB My registry vars are:...
1
by: CSTechie | last post by:
I've been battling to install PEAR on Windows XP now for too long. I am not sure what I need to do. When I run go-pear.php from the command line, I get the error message as shown at the end. I...
1
by: IchBin | last post by:
I remember having problems with pear when I first installed it but got it running some time ago. This is on a windoze XP SP OS. I did not think it was correct because it pointed to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.