RE: [PEAR] Difficulty using PEAR with windows32
| From: | Sherwin M. Harris | Date: | Thu, 14 Nov 2002 19:19:54 +0000 |
| Subject: | RE: [PEAR] Difficulty using PEAR with windows32 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2727@lists.php.net to get a copy of this message | ||
Did you just edit the ini file in the c:\php directory or did you upload that one to your c:\winnt
directory. That is where PHP will look for the ini file.
-----Original Message-----
From: John Soares [mailto:support@onlinescamreports.com]
Sent: Thursday, November 14, 2002 10:43 AM
To: pear-general@lists.php.net
Subject: [PEAR] Difficulty using PEAR with windows32
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