X-Original-To: pgsql-php@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D5371474E4F for ; Thu, 6 Feb 2003 08:59:44 -0500 (EST) Received: from Piac (www.compax.hu [213.163.10.114]) by postgresql.org (Postfix) with ESMTP id 98FF5474E44 for ; Thu, 6 Feb 2003 08:59:42 -0500 (EST) Received: from [213.163.10.121] by Piac (ArGoSoft Mail Server Pro for WinNT/2000/XP, Version 1.8 (1.8.2.5)); Thu, 6 Feb 2003 14:52:40 +0100 Message-ID: <000e01c2cde8$13b30000$790aa3d5@compax> From: =?iso-8859-2?Q?Borsos_J=F3zsef?= To: "Mileta Vinerte" Cc: References: <000b01c2c3d2$0d80f9a0$790aa3d5@compax> <3E368E04.7060308@cbnco.com> Subject: Re: what do I wrong??? Date: Thu, 6 Feb 2003 15:00:12 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01C2CDF0.733CBA40" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/31 X-Sequence-Number: 1882 This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C2CDF0.733CBA40 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable ----- Original Message -----=20 From: Mileta Vinerte=20 To: Borsos J=F3zsef=20 Sent: Tuesday, January 28, 2003 3:04 PM Subject: Re: [PHP] what do I wrong??? Hi Jozsef, Ther is my code (db_connect.php): =20=20=20=20=20=20=20=20 Borsos J=F3zsef wrote: $conn_string =3D "host=3Dx.x.x.x port=3D5432 dbname=3Dxxxx user=3DCOMPA= X password=3Dxxxx"; $connect =3D pg_connect($conn_string); RESULT: Warning: pg_connect() [function.pg-connect]: Unable to connect to Postg= reSQL server: Password authentication failed for user 'COMPAX' . in xxx on = line 4 Thanks for helping, but this is the answer: Warning: pg_connect() [function.pg-connect]: Unable to connect to Postgre= SQL server: fe_sendauth: no password supplied . in C:\Inetpub\wwwroot\Borso= s\db_connect.php on line 17 ERROR: Connection to Server failed! ------=_NextPart_000_000B_01C2CDF0.733CBA40 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable
 
----- Original Message -----
Fro= m:=20 Mileta= =20 Vinerte
Sent: Tuesday, January 28, 2003 3:= 04=20 PM
Subject: Re: [PHP] what do I=20 wrong???

Hi Jozsef,

Ther is my code=20  (db_connect.php):

<?php
//****************************= *****************************************************
//  &nbs= p;   =20 db_connect.php
//
//      1. Connect to the=20 server
//    2. Connect to the database with the=20 username=3Dpostgres and=20 pw=3Dpostgre$
//
//************************************************= *********************************

$server=3D"172.30.30.27";
$port= =3D"5432";
$db=3D"doors";
$dbusername=3D"postgres";
$dbuserpw=3D"p= ostgre$";

//connect=20 to server
$serverconn =3Dpg_Connect($server,=20 $port,$db);

    if(!$serverconn)
  &nb= sp;=20     {
        echo "ERROR= :=20 Connection to Server failed!";
       = =20 exit;
        }
   =20    
$dbconn =3Dpg_pconnect("dbname=3D$db user=3D$dbuse= rname=20 password=3D$dbuserpw");
       =20
        if(!$dbconn)
  &nb= sp;=20     {
        echo "ERROR= :=20 Connection to Database failed!";
       = =20 exit;
        }
?>  &nbs= p;=20    


Borsos J=F3zsef wrote:
$conn_string =3D "host=3Dx.x.x.x port= =3D5432=20 dbname=3Dxxxx user=3DCOMPAX password=3Dxxxx";
  $connect =3D=20 pg_connect($conn_string);
 
RESULT:
 
Warning: pg_connect()=20 [function.pg-connect]: Unable to connect to Postgre= SQL=20 server: Password authentication failed for user 'COMPAX' . in=20 xxx on line=20 4

 
Thanks for helping, but this is the answer:
 
Warning: pg_connect() [function.pg-connect]:= Unable=20 to connect to PostgreSQL server: fe_sendauth: no password supplied . in= =20 C:\Inetpub\wwwroot\Borsos\db_connect.php on line 17
ERRO= R:=20 Connection to Server failed!
------=_NextPart_000_000B_01C2CDF0.733CBA40--