Oracle8i PEAR Connection problem
| From: | ORLANDO POZO | Date: | Mon, 15 Sep 2003 16:27:08 +0000 |
| Subject: | Oracle8i PEAR Connection problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-162639@lists.php.net to get a copy of this message | ||
Hello, mailing-list people, I need help about connect the RDBMS Oracle8i through PEAR library, look this code
<html><head><title>Test DB Class - PEAR</title></head>
<body>
<table border=1>
<tr><th>NAME</th><th>PHONE</th><th>ADDRESS</th></tr>
<?php
//connect
require_once('DB.php');
$db =DB::connect("oci8://system:manager@localhost/orcl");
// message
if (DB::iserror($db)) {
die($db->getMessage());
}
//issue the query
$sql ="SELECT *
FROM S_CUSTOMER";$q =$db->query($sql); // message if (DB::iserror($q)) { die($q->getMessage()); } //generate table while ($q->fetchInto($row)) { ?> <tr><td><?= $row[0] ?></td> <td><?= $row[1] ?></td> <td><?= $row[2] ?></td> </tr> <?php } ?> </table> </body></html> When I execute this code, I receive this output: DB Error: extension not found
NAME PHONE ADDRESSI think that is a problem with the DSN in the connection (oci8://system:manager@localhost/orcl) I put oci8 for the db type, user: system, pass: manager, and db: orcl I could connect oracle8i with PHP, but using ODBC methods, I want now connect oracle8i through the PEAR library. If someone know, please give me a hand, thanks.