From dr_sad@surguttel.ru Wed Aug 28 03:51:42 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B61194762F8 for ; Tue, 27 Aug 2002 23:51:42 -0400 (EDT) Received: from mail.surguttel.ru (unknown [217.106.46.1]) by postgresql.org (Postfix) with ESMTP id 52A434761FD for ; Tue, 27 Aug 2002 23:51:41 -0400 (EDT) Received: from dr_sad (oper.surguttel.ru [217.106.46.7] (may be forged)) by mail.surguttel.ru (8.12.2/8.12.2/SuSE Linux 0.6) with ESMTP id g7SGp2CH010886 for ; Wed, 28 Aug 2002 09:51:02 -0700 Date: Wed, 28 Aug 2002 09:51:47 +0600 From: "dr_sad(surguttel)" X-Mailer: The Bat! (v1.53d) Reply-To: "dr_sad(surguttel)" X-Priority: 3 (Normal) Message-ID: <150770979970.20020828095147@surguttel.ru> To: pgsql-php@postgresql.org Subject: Where can I get error messages? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavis-milter (http://amavis.org/) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/90 X-Sequence-Number: 1435 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 From jllachan@nsd.ca Wed Aug 28 15:18:08 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CBC2947645B for ; Wed, 28 Aug 2002 11:18:08 -0400 (EDT) Received: from beamish.nsd.ca (unknown [205.150.156.194]) by postgresql.org (Postfix) with ESMTP id 6F19B476262 for ; Wed, 28 Aug 2002 11:18:03 -0400 (EDT) Received: (from smap@localhost) by beamish.nsd.ca (8.9.3/8.9.3) id LAA25475; Wed, 28 Aug 2002 11:17:29 -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 xma025473; Wed, 28 Aug 02 11:17:15 -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 LAA11818; Wed, 28 Aug 2002 11:17:15 -0400 Message-ID: <3D6CEA4B.76516A2E@nsd.ca> Date: Wed, 28 Aug 2002 11:20:43 -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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/96 X-Sequence-Number: 1441 Why don't you use the DB::connect instead? "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) From dr_sad@surguttel.ru Thu Aug 29 03:57:32 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 247B2475CB8 for ; Wed, 28 Aug 2002 23:57:32 -0400 (EDT) Received: from mail.surguttel.ru (unknown [217.106.46.1]) by postgresql.org (Postfix) with ESMTP id DBF0B475B99 for ; Wed, 28 Aug 2002 23:57:30 -0400 (EDT) Received: from dr_sad (oper.surguttel.ru [217.106.46.7] (may be forged)) by mail.surguttel.ru (8.12.2/8.12.2/SuSE Linux 0.6) with ESMTP id g7TGukCH007756; Thu, 29 Aug 2002 09:56:46 -0700 Date: Thu, 29 Aug 2002 09:57:34 +0600 From: "dr_sad(surguttel)" X-Mailer: The Bat! (v1.53d) Reply-To: "dr_sad(surguttel)" X-Priority: 3 (Normal) Message-ID: <193857726615.20020829095734@surguttel.ru> To: Jean-Luc Lachance Cc: pgsql-php@postgresql.org Subject: Re: Where can I get error messages? In-Reply-To: <3D6CEA4B.76516A2E@nsd.ca> References: <150770979970.20020828095147@surguttel.ru> <3D6CEA4B.76516A2E@nsd.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavis-milter (http://amavis.org/) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/100 X-Sequence-Number: 1445 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 --------- "); $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 From hierophant@pcisys.net Thu Aug 29 05:37:34 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 59C8D475B42 for ; Thu, 29 Aug 2002 01:37:34 -0400 (EDT) Received: from krusty.pcisys.net (krusty.pcisys.net [216.229.32.178]) by postgresql.org (Postfix) with ESMTP id B6761475AFB for ; Thu, 29 Aug 2002 01:37:33 -0400 (EDT) Received: from [216.229.45.2] (moe.rbe45-2.cos.pcisys.net [216.229.45.2]) by krusty.pcisys.net (8.12.5/8.12.5) with ESMTP id g7T5bVlM007998 for ; Wed, 28 Aug 2002 23:37:32 -0600 (MDT) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.4 Date: Wed, 28 Aug 2002 23:37:33 -0600 Subject: Re: Where can I get error messages? From: Keary Suska To: Postgres-PHP Message-ID: In-Reply-To: <193857726615.20020829095734@surguttel.ru> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/102 X-Sequence-Number: 1447 on 8/28/02 9:57 PM, dr_sad@surguttel.ru purportedly said: > 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 :\ > This would mean that something is interfering with PHP's standard error reporting mechanism. Look for set_error_handler in any PHP code you invoke and check your php.ini for any related directive, as well as any auto-append or auto-prepend scripts if defined. Keary Suska Esoteritech, Inc. "Leveraging Open Source for a better Internet" From poppcorn@cornelia-boenigk.de Thu Aug 29 12:57:31 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6429B4769A5 for ; Thu, 29 Aug 2002 08:57:31 -0400 (EDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by postgresql.org (Postfix) with ESMTP id 35AFE476956 for ; Thu, 29 Aug 2002 08:55:29 -0400 (EDT) Received: from [212.227.126.162] (helo=mrelayng3.kundenserver.de) by moutng3.kundenserver.de with esmtp (Exim 3.35 #2) id 17kOpf-0003aJ-00 for pgsql-php@postgresql.org; Thu, 29 Aug 2002 14:55:31 +0200 Received: from [213.7.19.188] (helo=zwerg98) by mrelayng3.kundenserver.de with asmtp (Exim 3.35 #2) id 17kOpe-0004Xl-00 for pgsql-php@postgresql.org; Thu, 29 Aug 2002 14:55:31 +0200 Message-ID: <007c01c24f5b$cc8e6ee0$7f54fea9@zwerg98> Reply-To: "Cornelia Boenigk" From: "Cornelia Boenigk" To: "Postgres-PHP" References: Subject: Re: Where can I get error messages? Date: Thu, 29 Aug 2002 14:57:42 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/105 X-Sequence-Number: 1450 Hi Andrey > Can't find any documents about "DB::connect" at www.php.net :( So check the pear-doku. > And why "pg_connect" does not work properly? You are using a persistent connection in your example, but anyway, your code is working for me perfectly. To get errormessages try out pg_last_error() or pg_result_error(). Regards Conni From jllachan@nsd.ca Thu Aug 29 15:40:56 2002 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 From dr_sad@surguttel.ru Fri Aug 30 06:26:09 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6A3654759BD for ; Fri, 30 Aug 2002 02:26:09 -0400 (EDT) Received: from mail.surguttel.ru (unknown [217.106.46.1]) by postgresql.org (Postfix) with ESMTP id C2E6A47597C for ; Fri, 30 Aug 2002 02:26:07 -0400 (EDT) Received: from dr_sad (oper.surguttel.ru [217.106.46.7] (may be forged)) by mail.surguttel.ru (8.12.2/8.12.2/SuSE Linux 0.6) with ESMTP id g7UJPDCH018809; Fri, 30 Aug 2002 12:25:13 -0700 Date: Fri, 30 Aug 2002 12:26:04 +0600 From: "dr_sad(surguttel)" X-Mailer: The Bat! (v1.53d) Reply-To: "dr_sad(surguttel)" X-Priority: 3 (Normal) Message-ID: <43953037134.20020830122604@surguttel.ru> To: Jean-Luc Lachance Cc: pgsql-php@postgresql.org Subject: Re: Where can I get error messages? In-Reply-To: <3D6E4129.FA61A0AA@nsd.ca> References: <150770979970.20020828095147@surguttel.ru> <3D6CEA4B.76516A2E@nsd.ca> <193857726615.20020829095734@surguttel.ru> <3D6E4129.FA61A0AA@nsd.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavis-milter (http://amavis.org/) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/110 X-Sequence-Number: 1455 Sorry, but this sample doesn't work... :\ if I change phptype "pgsql" in DSN (pgsql://$userid:$password@$dbhost/$database) on "mysql", then get error message:"DB Error: connect failed", but else if phptype=pqsql (as write in sample) nothing happyness and result html code is: PostgreSQL PHP Test -- Best wishes, Andrey Thursday, August 29, 2002, 9:43:37 PM, you wrote: JLL> Here is a sample: JLL> JLL> JLL> PostgreSQL PHP Test JLL> JLL>
JLL> require_once( 'DB.php'); JLL> $userid=...; JLL> $password=...; JLL> $dbhost=...; JLL> $databse=...; JLL> $db = DB::connect( "pgsql://$userid:$password@$dbhost/$database"); JLL> if( DB::iserror( $db)) JLL> { JLL> die( "DB:connect " . $db->getMessage()); JLL> } JLL> $sql = "select * from whatever"; JLL> $q = $db->query($sql); JLL> if( DB::iserror( $q)) JLL> { JLL> die( "Query " . $q->getMessage()); JLL> } JLL> while( $row = $q->fetchRow( )) JLL> { JLL> ?> JLL> JLL> JLL> JLL> JLL> } JLL> ?> JLL>
JLL> JLL> JLL> Make sure that you include /usr/share/pear in the include_path in JLL> php.ini and restart httpd. JLL> JLL 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 From miguel@ipatimup.pt Thu Sep 19 20:43:35 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C4830476282 for ; Thu, 19 Sep 2002 16:43:35 -0400 (EDT) Received: from mail.ipatimup.pt (peterpan.ipatimup.pt [194.65.114.74]) by postgresql.org (Postfix) with ESMTP id 21CE3475EA8 for ; Thu, 19 Sep 2002 16:43:30 -0400 (EDT) Received: from ipatimup.pt (localhost [127.0.0.1]) by mail.ipatimup.pt (8.11.6/IPATIMUP) with SMTP id g8JKAGr27928; Thu, 19 Sep 2002 21:10:17 +0100 X-RAV-AntiVirus: This e-mail has been scanned for viruses on host: mail.ipatimup.pt Received: from 193.136.62.21 (proxying for unknown) (SquirrelMail authenticated user miguel) by www.ipatimup.up.pt with HTTP; Thu, 19 Sep 2002 21:10:17 +0100 (WEST) Message-ID: <3940.193.136.62.21.1032466217.squirrel@www.ipatimup.up.pt> Date: Thu, 19 Sep 2002 21:10:17 +0100 (WEST) Subject: Re: Where can I get error messages? From: "Miguel Carvalho" To: In-Reply-To: <3D6CEA4B.76516A2E@nsd.ca> References: <150770979970.20020828095147@surguttel.ru> <3D6CEA4B.76516A2E@nsd.ca> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Cc: Reply-To: miguel@ipatimup.pt X-Mailer: SquirrelMail (version 1.2.6) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/42 X-Sequence-Number: 1497 > Why don't you use the DB::connect instead? > > "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: Can you login with the same user and password using pgsql? Are the database server and webserver running on the same machine? >> >> >> >> >> >> >> >> 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? If the script has stopped at pg_connect there are two things: - the database server isnt running - the password, login,machine ip you are using arent authorized to connect Take a look at the log of postgres. For this, i hope you havent sent the output of the postmaster to /dev/null. Miguel