PEAR difficulties
| From: | Jacob Marble | Date: | Thu, 06 Feb 2003 19:11:27 +0000 |
| Subject: | PEAR difficulties | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-3632@lists.php.net to get a copy of this message | ||
Hello everyone,
I use PHP to access a SQL Server database through ODBC on a win2000
machine, and we want to move to PostgreSQL on a Debian 3.0 machine and
access the data through PEAR. everything is running now, I've migrated to
Postgres without a problem. So all of my data is still intact. Now, here's
my first unconquerable problem:
<code>
<?php
// this file is intended to serve as a header
// the following line should be at the top of any page that connects to the
LandEZ database
//$connect = odbc_connect("landez_web","",""); // take note (
"odbc resource
name", "username", "passwd" )
require ("DB.php");
function handle_errors ($error) {
echo "An error occurred while running your query.<br>\n";
echo "Error message: " . $error->getMessage() . "<br>\n";
echo "A more detailed error description: " . $error->getDebugInfo() .
"<br>\n";
}
$dsn = "pgsql://postgres:CORRECTPASSWD@localhost/landez_pds";
$db = DB::connect ( $dsn );
handle_errors ( $db );
?>
</code>
Now here's the error (as seen through IE6 on the development machine):
<error>
An error occurred while running your query.
Fatal error: Call to undefined function: getmessage() in
/landez/www/act/header_connect.php on line 10
</error>
Any help == greatly appreciated.
Thankyou,
Jake Marble
LandEZ