[postgis-users]CONNECTION to database thru Mapserver

w m wokar1 at yahoo.com
Mon Mar 14 11:12:44 PST 2005


Thanks for your reply. when I changed my STAUS to Default it gives me the following error:
 
msDrawMap(): Image handling error. Failed to draw layer named 'Hotspots'. 
msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with connect string 'user=project password=test dbname=Montreal host=132.205.108.60'. 
Error reported was 'could not connect to server: Connection refused Is the server running on host "132.205.108.60" and accepting TCP/IP connections on port 5432? '. 
This error occured when trying to make a connection to the specified postgresql server. 
Most commonly this is caused by 
(1) incorrect connection string 
(2) you didnt specify a 'user=...' in your connection string 
(3) the postmaster (postgresql server) isnt running 
(4) you are not allowing TCP/IP connection to the postmaster 
(5) your postmaster is not running on the correct port - if its not on 5432 you must specify a 'port=...' 
(6) the security on your system does not allow the webserver (usually user 'nobody') to make socket connections to the postmaster 
(7) you forgot to specify a 'host=...' if the postmaster is on a different machine
(8) you made a typo 

My server is running, what I am not sure is (4) and (5). Can you please explain me how can I check the above. Also the user name and password is the user name and password for the database right?

 
 
 
pram at pramcentral.com wrote:

----- Original Message -----
From: "w m" 
To: "PostGIS Users Discussion" 

Subject: Re: [postgis-users]CONNECTION to database thru Mapserver
Date: Mon, 14 Mar 2005 09:02:56 -0800 (PST)

> 
> Thank You for your response.
> i made the changes that you suggested but i still have no luck in 
> displaying the points on the map. I'm not sure if a connection is 
> being established to the database or not...how can i know that?? 
> and instead of local host i also tried to insert the ip address of 
> my server but it still didnt work nor did i get any errors.
> any help would be appreciated greately
> thank you
> wokar
> 
> LAYER
> CONNECTIONTYPE postgis
> NAME "Spots" # my table name
> CONNECTION "user=test password=test dbname=MyDataBase host=localhost"
> DATA "the_geom FROM Spots" # the_geom column from table Spots
> STATUS ON
> TYPE POINT
> CLASS
> COLOR 0 0 0
> OUTLINECOLOR 0 0 0
> SIZE 2
> END
> END
> 
Have you tried with STATUS DEFAULT instead of STATUS ON

-Prashanth
--
HTMLX.com
Mapserver, Mapscript, PHP Hosting


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050314/d392b892/attachment.html>


More information about the postgis-users mailing list