Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 74F8747671B for ; Thu, 29 Aug 2002 11:40:56 -0400 (EDT) Received: from beamish.nsd.ca (unknown [205.150.156.194]) by postgresql.org (Postfix) with ESMTP id 83A81476719 for ; Thu, 29 Aug 2002 11:40:55 -0400 (EDT) Received: (from smap@localhost) by beamish.nsd.ca (8.9.3/8.9.3) id LAA01700; Thu, 29 Aug 2002 11:40:22 -0400 X-Authentication-Warning: beamish.nsd.ca: smap set sender to using -f Received: from reddog.nsd.ca(192.168.101.30) by beamish.nsd.ca via smap (V2.1/2.1+anti-relay+anti-spam) id xma001694; Thu, 29 Aug 02 11:39:59 -0400 Received: from nsd.ca (jllachan-linux.nsd.ca [192.168.101.148]) by reddog.nsd.ca (8.8.7/8.8.7) with ESMTP id LAA17678; Thu, 29 Aug 2002 11:39:59 -0400 Message-ID: <3D6E4129.FA61A0AA@nsd.ca> Date: Thu, 29 Aug 2002 11:43:37 -0400 From: Jean-Luc Lachance X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.9-31 i686) X-Accept-Language: en MIME-Version: 1.0 To: "dr_sad(surguttel)" Cc: pgsql-php@postgresql.org Subject: Re: Where can I get error messages? References: <150770979970.20020828095147@surguttel.ru> <3D6CEA4B.76516A2E@nsd.ca> <193857726615.20020829095734@surguttel.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/106 X-Sequence-Number: 1451 Here is a sample: PostgreSQL PHP Test getMessage()); } $sql = "select * from whatever"; $q = $db->query($sql); if( DB::iserror( $q)) { die( "Query " . $q->getMessage()); } while( $row = $q->fetchRow( )) { ?>
Make sure that you include /usr/share/pear in the include_path in php.ini and restart httpd. JLL "dr_sad(surguttel)" wrote: > > Hi, Jean-Luc. > Can't find any documents about "DB::connect" at www.php.net :( > Give me please any links to that. > And why "pg_connect" does not work properly? > Script ex.: > ---- cut --------- > > > printf("Hello, world!
"); > $s="host=dbserv port=5432 dbname=ll user=postgres password=gecnzr"; > if (($db=pg_pconnect ($s))===false) {printf("FALSE! No connection!
");} > printf("This is the end of script
"); > ?> > > > --- cut ----------- > No errors messages... "Hello, world!
" - is the last line in > generated html text :\ > > with respect, Andrey > > Wednesday, August 28, 2002, 9:20:43 PM, you wrote: > JLL> Why don't you use the DB::connect instead? > > JLL> "dr_sad(surguttel)" wrote: > >> > >> I've installed Postgres 7.2.2 on Linux SuSE 8.0 Pro. > >> >From other server (SuSE 8.0 Pro + Apache 2.0.39 + PHP 4.2.2) I'm trying > >> to get access to Postgres database, using PHP-script: > >> > >> > >> > >> > >> > >> > >> > >> I've no errors messages both in PHP log and Postgres console, but HTML > >> page was been generated this script are stoped on tag. Where > >> can I get error messages? That is possible troubles? > >> > >> Thank You > >> > >> -- > >> With respect, Andrey Sergeev > >> > >> ---------------------------(end of broadcast)--------------------------- > >> TIP 2: you can get off all lists at once with the unregister command > >> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > > JLL> ---------------------------(end of broadcast)--------------------------- > JLL> TIP 4: Don't 'kill -9' the postmaster