Skip site navigation (1) Skip section navigation (2)

Re: PHP and POSTGRES under windows

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: PHP and POSTGRES under windows
Date: 2003-02-17 15:55:48
Message-ID: 5.1.1.6.0.20030217105432.033b87d0@pop6.sympatico.ca (view raw or flat)
Thread:
Lists: pgsql-php
port 80 is typically http - the default for pgsql is 5432.


At 12:41 AM 2/15/03, Raymond Chua Sing wrote:
>I have recently installed PHP and postgres(windows
>version by peerdirect) I accomplished linking the
>extension of postgres to php and made postgres to work
>with pgadminnII but I can't connect to the database
>using postgres functions this error always shows up on
>my page:
>"Unable to connect to PostgreSQL server:
>connectDBStart() -- socket() failed: errno=2 No such
>file or directory "
>and this code is what I use to connect to the DB
>"<?php
>    // Database variables
>    // $dbhost      = "db";
>    $dbname      = "hbcdb";
>    $dbusername  = "Mondi0924";
>    $dbpassword  = "1236964";
>
>    $dbconn = pg_connect("dbname=$dbname
>user=$dbusername password=$dbpassword port=80");
>    if (!$dbconn)
>    {
>       header("Location: error.php3?errorcode=1");
>       exit;
>    }
>?>"
>I have been using postgres in the office using a linux
>server thats why I need postgres at home could you
>please help me thx.


In response to

pgsql-php by date

Next:From: John ChapmanDate: 2003-02-17 15:56:45
Subject: Re: tcp connections
Previous:From: angelo.rigoDate: 2003-02-17 15:47:52
Subject: tcp connections

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group