nadeemshafi9 Posted June 15, 2007 Share Posted June 15, 2007 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. if i just do require_once 'DB.php'; it cant find it at all Thankks for any hel guys Link to comment https://forums.phpfreaks.com/topic/55760-pear-noobie-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.