getting problem to use pear

Looking for volunteers to join your project? Need help with a script but can't afford to pay? Want to offer your services as a volunteer to build up your portfolio? This is the place for you...

Moderator: General Moderators

Post Reply
mani_php
Forum Newbie
Posts: 1
Joined: Sun Sep 03, 2006 2:15 pm

getting problem to use pear

Post by mani_php »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hi,
Here i am facing problem to use pear in windows environment. I have followed the steps to install pear in windows environment which is given in net . After when i check with example :

Code: Select all

<?php
require_once 'DB.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);

$db_host = 'localhost';
$db_user = ‘*********’;
$db_pass = ‘*********’;
$db_name = ‘********’;
$dsn = "mysql;//$db_user:$db_pass@unix+$db_host/$db_name";

$db = DB::connect($dsn);
$db->setFetchMode(DB_FETCHMODE_OBJECT);
?>
to connet with db it showing the error

Code: Select all

Warning: main(DB.php) [function.main]: failed to open stream: No such file or directory in d:\wamp\www\PEAR\untitled-1.php on line 2
Fatal error: main() [function.require]: Failed opening required 'DB.php' (include_path='d:\php\includes;D:\php\PEAR') in d:\wamp\www\PEAR\untitled-1.php on line 2
Thanks in advance.

:(


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Why is this in volunteer work?
Post Reply