PDA

View Full Version : PHP PEAR - how in include DB.php



DaddyOh
12-31-2006, 04:12 AM
I'm trying to include DB.php and php can't find the DB PEAR file. I've run a little PHP script to look at the files and directories in the PHP include paths and can't seem to locate the library files. I do see several PEAR files for installing PEAR etc.

Currently I don't have SSH access and will be requesting it but in the meantime any help would be appreciated.

Happy New Year!!!!

Eric

dkinzer
12-31-2006, 10:14 AM
I'm trying to include DB.php and php can't find the DB PEAR file.Perhaps /usr/lib/php/DB.php?

Note that this is separate from PEAR:
/usr/lib/php/PEAR.php

nbabb
01-01-2007, 05:27 PM
I am a php novice, long time programmer. I am having problems with my isp's install of PEAR, or my use of it. Everything seems to be fine up until I try and connect to the database through PEAR. I'm getting the following messages.

Warning: connect(DB/mysql.php) [function.connect]: failed to open stream: No such file or directory in /usr/local/lib/php/DB.php on line 371

Warning: connect() [function.include]: Failed opening 'DB/mysql.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /usr/local/lib/php/DB.php on line 371

Is there something anyone can suggest I check, or that I can suggest to my ISP to get PEAR db connectivity working? I did have things working before, but my ISP reconfigured their servers and now the php app I was using won't work. My version of PHP is 4.4.3 and MySQL is 4.0.27

mysql://<db_user_name>:<db_user_password>@<host>/<database_name>

Thanks.

cade
01-10-2007, 03:18 PM
If you have shell access, you may want to check that the module is installed:


pear list

If the the module is not installed, ask your ISP to install it for you. If they are unable or unwilling to install the DB module, you can drop it in a directory and load it locally modifying the require_once command.


require_once '/path/to/local/file/DB.php';