Re: PEAR difficulties
| From: | Jacob Marble | Date: | Thu, 06 Feb 2003 20:35:51 +0000 |
| Subject: | Re: PEAR difficulties | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3635@lists.php.net to get a copy of this message | ||
Now it returns:
db_pgsql
What does that mean?
Thanks,
Jake
"Tony Bibbs" <tony@tonybibbs.com> wrote in message
news:Pine.LNX.4.44.0302061344080.3679-100000@internal.iowaoutdoors.org...
> well, start by finding out what you got back. add this at the top of
> handle_errors:
>
> echo get_class($error);
> exit;
>
> You should get back a PEAR Error object if it is truly an error...
>
> --Tony
>
> On Thu, 6 Feb 2003, Jacob Marble wrote:
>
> > 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
> >
> >
> >
> >
>
> --
> ------------------------------------------------------------------------|
> Tony Bibbs | "I guess you have to remember that those who don't |
> tony@tonybibbs.com | hunt or fish often see those of us who do as |
> | harmlessly strange and sort of amusing. When you |
> | think about it, that might be a fair assessment." |
> | --Unknown |
> ------------------------------------------------------------------------|
>
>