Jump to content

PEAR noobie HELP


nadeemshafi9

Recommended Posts

Hello guys

 

I am using a PEAR package for the first time, on a well established WIMP environment. I have installed teh PEAR package DB and i cant get it to work.

 

here is my code:

 

<?php

 

require_once 'C:\php\pear\DB.php';

 

$dsn = 'mysql://root:******@localhost/coles';

$options = array(

'debug'   => 2,

'portability' => DB_PORTABILITY_ALL,

);

 

$db =& DB::connect($dsn, $options);

if (PEAR::isError($db)) {

die($db->getMessage());

}

 

// ...

 

$db->disconnect();

 

 

?>

 

Here is the Error:

 

PHP Warning: main(DB/common.php) [function.main]: failed to open stream: No such file or directory in C:\PHP\PEAR\DB\mysql.php on line 30 PHP Fatal error: main() [function.require]: Failed opening required 'DB/common.php' (include_path='.;C:\php5\pear') in C:\PHP\PEAR\DB\mysql.php on line 30

 

 

There is a directory in PEAR called DB and it does have mysql.php and common.php.

 

the include path looks wrong (include_path='.;C:\php5\pear') its all in C:\PHP, i dont know where to correct this its not in the php.ini as far as i know. I just want to get on with using PEAR and its looking like a dead end at the mo.

 

Thankks for any hel guys

Link to comment
https://forums.phpfreaks.com/topic/55759-pear-noobie-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.