Re: unable to locate DB.php after PEAR installation and all the checks
| From: | Krishnamurthy Nagarajan | Date: | Wed, 24 Jun 2009 05:22:52 +0000 |
| Subject: | Re: unable to locate DB.php after PEAR installation and all the checks | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-29903@lists.php.net to get a copy of this message | ||
Thanks very much, Daniel! That really helped. I ran pear to install DB (pear install DB) and it
correctly installed the DB module in the php/PEAR sub-directory (though the PEAR manual instructs me
as to how to install modules, I didn't take that route, assuming that DB gets installed by
default as soon as I install PEAR. That wasn't the case). I have verified that I have
c:\php\PEAR in my include_path. And I don't have any other problems, such as wrong include
paths, missing trailing '\' etc.
So now,
require_once('DB.php');
now works correctly.
thanks again.
cheers,
nagarajan
p.s : cc'ing the list so that others on the list also know that your advice worked.
________________________________
From: Daniel O'Connor <daniel.oconnor@gmail.com>
To: Krishnamurthy Nagarajan <knr_sh@yahoo.com>
Cc: pear-general@lists.php.net
Sent: Tuesday, June 23, 2009 9:52:56 AM
Subject: Re: [PEAR] unable to locate DB.php after PEAR installation and all the checks
On Tue, Jun 23, 2009 at 2:35 AM, Krishnamurthy Nagarajan <knr_sh@yahoo.com> wrote:
Hi friends,
I have installed PHP 5.2.9 and went ahead and PEAR database abstraction layer as per the PEAR
manual. But I am unable to locate DB.php
which is essential to establish connection with the database (MySQL in my case) and do db
operations. I have done all the necessary checks as per the manual to ensure that the installation
is correct, include path is fine, PHP is running (phpinfo.php runs correctly) PEAR is fine (sample
check_pear.php
as per the manual and so on. But, other than DependencyDB.php, I haven't been able to locate
DB.php in the directory hierarchy where I installed PHP.
The OS is WinXP. Please help and let me know what mistake I am doing. Thanks.
Doing:
c:\pear install DB
should install as:
c:\php\PEAR\DB.php
and
require_once 'DB.php'; should work
so long as c:\php\PEAR\ is in your include path.
So; things which might be wrong:
* Apache needs restarting whenever you change your ini
* Make sure you only have 1x php.ini
* Lack of trailing "\" on your directories?