Hello every body
Posted by: bhupal (220.225.226.---)
Date: October 13, 2006 11:59AM

Can anybody explain me How to install and use pear db in php ?

Thank you
Bhupal

Options: ReplyQuote
Re: Hello every body
Posted by: roms (---.w193-251.abo.wanadoo.fr)
Date: October 13, 2006 03:05PM

Click on go-pear.bat in the php directory. Choose local install and follow the instrcutions. Once finished, open your php.ini file (in the apache2/bin directory) and modifiy the include_path instruction to add the path to the pear directory. The line should look to somthing like this :

include_path= ".;c:\wamp\php\pear"

(don't forget to delete the ; in front of the line).

Reboot your server, now pear is installed.

You now need to install the db package.

For that, open a dos window, go to c:\wamp\php and type

pear install db

This will download and install the db package.
That's it you can now use it by including the db.php file in your scripts.



Romain

Options: ReplyQuote
Re: Hello every body
Posted by: bhupal (220.225.226.---)
Date: October 14, 2006 11:38AM

Thanking you for the help.

I have modified the php.ini file as you said and installed package DB through dos mode but when i am executing the following programm
<?php
require_once 'DB.php';

$dsn = 'mysql://root:@localhost/test';
$options = array(
'debug' => 2,
'portability' => DB_PORTABILITY_ALL,
);

$db =& DB::connect($dsn, $options);
if (PEAR::isError($db)) {
die($db->getMessage());
}

// ...

$db->disconnect();
?>



I am getting this errors





Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\pear\db1.php on line 3

Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='.;C:\php5\pear') in C:\wamp\www\pear\db1.php on line 3





Please anybody help me this is urgent for me project

Options: ReplyQuote


Sorry, only registered users may post in this forum.