Re: Difficulty using PEAR with windows32
| From: | Michael Dransfield | Date: | Fri, 15 Nov 2002 00:20:53 +0000 |
| Subject: | Re: Difficulty using PEAR with windows32 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2728@lists.php.net to get a copy of this message | ||
the include directory that you need to add to php.ini is
c:\php\pear
mine looks like this
include_path = ".;c:\php\pear"
see here http://uk.php.net/manual/en/faq.installation.php#faq.installation.phpini for more details of where the php.ini file should be kept
At 12:42 14/11/2002 -0500, John Soares wrote:
Gentlemen: I installed php/apache/mysql using the ephp package. I want to use PEAR and notice that the PEAR files seem to be in the c:\php directory. I put this directory in my include_path statement in my php.ini file(the one found in the c:\php directory. When I try to connect to the database, I get a "db not found" error. I know there is nothing wrong with my database, since I have used the username, password, and database name using php API commands. Here is the sample file I use: <? $user = "jsoares"; $pass = "39847029"; $hostname = "localhost"; $database = "bookstore"; $dbms = "mysql"; require ("DB.php"); $db = DB::connect("$dbms://$user:$pass@$hostname/$database"); if (DB::isError($db)) { die ($db->getMessage()); } $sql = "select * from books where price > 22";$resultback = DB_result($sql, $result);while ($row = $resultback->fetchRow()) { echo "$row <br>"; } $db->disconnect(); ?> What could be wrong? I'm wasting a lot of time trying to find this out! Thanks. John Soares mailto:johnsoares285@hotmail.com