Trouble with pear installation
Posted by: dbnavan (---.dsl.digiweb.ie)
Date: February 08, 2008 09:50PM

I have created the following file

<?php

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

$db_host = 'localhost';
$db_user = 'user';  // demo purposes
$db_pass = 'password'; // demo purposes
$db_name = 'name'; // demo purposes
$dsn = "mysql://$db_user:$db_pass@unix+$db_host/$db_name";

$db = DB::connect($dsn);
$db->setFetchMode(DB_FETCHMODE_OBJECT);

?>

However when I attempt to invoke the file i get the following....

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

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

Any ideas?

Options: ReplyQuote
Re: Trouble with pear installation
Posted by: yfastud (Moderator)
Date: February 08, 2008 09:56PM

Did you install PEAR before running this script?

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Trouble with pear installation
Posted by: dbnavan (---.dsl.digiweb.ie)
Date: February 08, 2008 09:57PM

Yes but am not sure that it is installed correctly, finding it confusing, I am a newbie smiling smiley

Options: ReplyQuote
Re: Trouble with pear installation
Posted by: yfastud (Moderator)
Date: February 08, 2008 10:05PM

After installing PEAR, you should test to make sure your PEAR is running; you should google for some command to test your pear ;-)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Trouble with pear installation
Posted by: dbnavan (---.dsl.digiweb.ie)
Date: February 08, 2008 10:10PM

yfastud Wrote:
-------------------------------------------------------
> After installing PEAR, you should test to make
> sure your PEAR is running; you should google for
> some command to test your pear ;-)

Obviously if I stated I am a newbie, google may have taken me here, just spent the three hours (on google) trying to figure this out. thought I might get some useful help here, obviously not...:rollseyes:

Options: ReplyQuote
Re: Trouble with pear installation
Posted by: yfastud (Moderator)
Date: February 08, 2008 10:19PM

I know you will say something like that

Anyway, did you try this?

Once PEAR is installed, go to the php.ini file in your C:\wamp\bin\apache\apache2.2.6\bin directory. Find the
Code:

;include_path = ".;c:\php\includes"

Remove the semi-colon (to un-comment it), and then add C:\php\PEAR to it
Code:

include_path = ".;c:\php\includes;C:\php\PEAR"



BTW, Happy Lunar New Year ;-) ;-) ;-)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides



Edited 1 time(s). Last edit at 02/08/2008 10:26PM by yfastud.

Options: ReplyQuote
Re: Trouble with pear installation
Posted by: dbnavan (---.dsl.digiweb.ie)
Date: February 08, 2008 10:29PM

Layout of my wamp folder is different to instructions, I am using version 1.7.3 think I will upgrade it might help. Thanks, sorry if I showed frustration, I did come accross similiar instructions somewhere earlier to i did change the php.ini accordingly but it is located at c:\wamp\apache2\bin\php.ini does this make difference.

Options: ReplyQuote
Re: Trouble with pear installation
Posted by: dbnavan (---.dsl.digiweb.ie)
Date: February 08, 2008 10:36PM

is it possible to upgrade and keep my config, mysql files etc?

Options: ReplyQuote
Re: Trouble with pear installation
Posted by: yfastud (Moderator)
Date: February 08, 2008 10:44PM

Instead upgrade, you should try to edit your recent php.ini first

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.