help Request

Started by Thomas Mammenalmost 23 years ago4 messagesgeneral
Jump to latest
#1Thomas Mammen
kthomas@convergsoft.com

scenario:
1. i have postgresql running on linux machine and apache on windows.

2. i am saving all my php files in windows system.

now i am trying
$con_string = "dbname=spamtrack port=5432 user=postgres password=postgres host=192.168.1.145";
$connection = pg_connect($con_string);

this is giving an error can you please guide me to get the solution

thanx & regards

#2Shridhar Daithankar
shridhar_daithankar@persistent.co.in
In reply to: Thomas Mammen (#1)
Re: help Request

On Friday 11 April 2003 19:29, you wrote:

now i am trying
$con_string = "dbname=spamtrack port=5432 user=postgres password=postgres
host=192.168.1.145"; $connection = pg_connect($con_string);

this is giving an error can you please guide me to get the solution

Check two things.

1. Have you started postgresql with network option? Check postgresql.conf
about how to set it and restart postmaster after you make the change.

2. Check permissions in pg_hba.conf so that you can access postgresql database
from windows machine.

Shridhar

#3Ken Guest
ken@tuatha.org
In reply to: Thomas Mammen (#1)
Re: help Request

Thomas Mammen wrote:

scenario:
1. i have postgresql running on linux machine and apache on windows.

2. i am saving all my php files in windows system.

now i am trying
$con_string = "dbname=spamtrack port=5432 user=postgres
password=postgres host=192.168.1.145";
$connection = pg_connect($con_string);

this is giving an error can you please guide me to get the solution

you may need to change the hba conf file to permit connections from your
windows box.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

#4Jan Wieck
JanWieck@Yahoo.com
In reply to: Thomas Mammen (#1)
Re: help Request

Thomas Mammen wrote:

scenario:
1. i have postgresql running on linux machine and apache on windows.

2. i am saving all my php files in windows system.

now i am trying
$con_string = "dbname=spamtrack port=5432 user=postgres
password=postgres host=192.168.1.145";
$connection = pg_connect($con_string);

this is giving an error can you please guide me to get the solution

The solution is simple, do everything right and it will work.

Okay, I take my first guess (assuming I have 3 guesses before I'm out):
The error message says something like "connection refused"?

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #