Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.