Re: what do I wrong???

Поиск
Список
Период
Сортировка
От Borsos József
Тема Re: what do I wrong???
Дата
Msg-id 000e01c2cde8$13b30000$790aa3d5@compax
обсуждение исходный текст
Ответ на what do I wrong???  (Borsos József <pgsql-php@borsos.hu>)
Список pgsql-php
 
----- Original Message -----
Sent: Tuesday, January 28, 2003 3:04 PM
Subject: Re: [PHP] what do I wrong???

Hi Jozsef,

Ther is my code  (db_connect.php):

<?php
//*********************************************************************************
//       db_connect.php
//
//      1. Connect to the server
//    2. Connect to the database with the username=postgres and pw=postgre$
//
//*********************************************************************************

$server="172.30.30.27";
$port="5432";
$db="doors";
$dbusername="postgres";
$dbuserpw="postgre$";

//connect to server
$serverconn =pg_Connect($server, $port,$db);

    if(!$serverconn)
        {
        echo "ERROR: Connection to Server failed!";
        exit;
        }
       
$dbconn =pg_pconnect("dbname=$db user=$dbusername password=$dbuserpw");
       
        if(!$dbconn)
        {
        echo "ERROR: Connection to Database failed!";
        exit;
        }
?>       


Borsos József wrote:
$conn_string = "host=x.x.x.x port=5432 dbname=xxxx user=COMPAX password=xxxx";
  $connect = pg_connect($conn_string);
 
RESULT:
 
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL 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 PostgreSQL server: fe_sendauth: no password supplied . in C:\Inetpub\wwwroot\Borsos\db_connect.php on line 17
ERROR: Connection to Server failed!

В списке pgsql-php по дате отправления:

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: [GENERAL] 7.3.1 BREAKS COMPATIBILITY with the latest PHP4 (due to libpq.so.[23])
Следующее
От: Martin Marques
Дата:
Сообщение: Not finding local variables and libs