Installing PEAR
| From: | Joao Prado Maia | Date: | Wed, 24 Jan 2001 05:44:51 +0000 |
| Subject: | Installing PEAR | ||
| Groups: | php.pear | ||
| Request: | Send a blank email to php-pear+get-1140@lists.php.net to get a copy of this message | ||
Hello everyone,
Can someone explain exactly how to install PEAR ? I ran the 'make
install-su' as the superuser and everything but I still get this following
error when I try to run a simple script that access a MySQL database thru
PEAR::DB. I think I might have forgot to do something, but since there is
no documentation on installing PEAR, here goes :)
Here's the error I'm getting:
Fatal error: Call to undefined function: query() in
/home/jpm/html/test.php on line 11
And this is the PHP script I'm trying to run:
<?php
error_reporting(1023);
include_once("settings.php");
require_once( 'DB.php' );
$db = DB::connect( "mysql://$dbuser:$dbpass@$dbhost/$dbname" );
$sql = 'SELECT * FROM demo';
$demoResult = $db->query($sql);
while ($demoRow = $demoResult->fetchRow()) {
echo $demoRow[2] . '<br>';
}
$db->disconnect();
?>
I would appreciate any help on this one.
Joao
--
João Prado Maia <jpm@phpbrasil.com>
http://phpbrasil.com - php com um jeitinho brasileiro