<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=524001023-14032005>Did
you try what the error message says to try?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005>ie:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005>the_geom from spots using SRID=<your
SRID></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005>or</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005>the_geom from (select * from spots) as foo using
unique oid using srid = <your SRID></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=524001023-14032005>The
latter requires you to set up an oid index:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=524001023-14032005>create
INDEX spots_oid on spots (oid);</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005>-e</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=524001023-14032005></SPAN></FONT> </DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>w
m<BR><B>Sent:</B> Monday, March 14, 2005 3:43 PM<BR><B>To:</B> PostGIS Users
Discussion<BR><B>Subject:</B> RE: [postgis-users]CONNECTION to database thru
Mapserver<BR><BR></FONT></DIV>
<DIV>Thank You Doug and Ethan:)</DIV>
<DIV>The connection is fine now. there were some things that did needed to be
changed in the configuration files.</DIV>
<DIV> </DIV>
<DIV>Now I get the error below. I did some search and I think that I
would have to upgrade postgis, is it true?</DIV>
<DIV> </DIV>
<DIV>msDrawMap(): Image handling error. Failed to draw layer named 'Hotspots'.
<BR>prep_DB(): Query error. Error executing POSTGIS DECLARE (the actual query)
statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d()),'NDR'),OID::text from WHERE &&
setSRID('BOX3D(-73.992437 45.0227318333333,-73.174263
45.9772681666667)'::BOX3D, find_srid('','','') )' <BR><BR>Postgresql reports
the error as 'ERROR: syntax error at or near "WHERE" at character 104
'<BR><BR>More Help:<BR><BR>Error with POSTGIS data variable. You specified
'<check your .map file>'.<BR>Standard ways of specifiying are : <BR>(1)
'geometry_column from geometry_table' <BR>(2) 'geometry_column from (<sub
query>) as foo using unique <column name> using SRID=<srid#>'
<BR><BR>Make sure you put in the 'using unique <column name>' and 'using
SRID=#' clauses in. <BR><BR>For more help, please see
http://postgis.refractions.net/documentation.php <BR><BR>Mappostgis.c -
version of Jan 23/2004. <BR>msPOSTGISLayerParseData(): Query error. Error
parsing POSTGIS data variable. Must contain 'geometry_column from table_name'
or 'geom from (subselect) as foo' (couldnt find ' from '). More help:
<BR><BR>Error with POSTGIS data variable. You specified 'the_geom FROM
Hotspots'.<BR>Standard ways of specifiying are : <BR>(1) 'geometry_column from
geometry_table' <BR>(2) 'geometry_column from (<sub query>) as foo using
unique <column name> using SRID=<srid#>' <BR><BR>Make sure you put
in the 'using unique <column name>' and 'using SRID=#' clauses in.
<BR><BR>For more help, please see
http://postgis.refractions.net/documentation.php <BR><BR>Mappostgis.c -
version of Jan 23/2004. <BR><BR><BR><B><I>Ethan Alpert
<ealpert@digitalglobe.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<DIV><SPAN class=048404321-14032005><FONT face=Arial color=#0000ff
size=2>Maybe there's a case sensitivity problem. Try using all lower case
for your db name.</FONT></SPAN></DIV>
<DIV><SPAN class=048404321-14032005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=048404321-14032005><FONT face=Arial color=#0000ff
size=2>-e</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of
</B>w m<BR><B>Sent:</B> Monday, March 14, 2005 2:33 PM<BR><B>To:</B>
PostGIS Users Discussion<BR><B>Subject:</B> Re: [postgis-users]CONNECTION
to database thru Mapserver<BR><BR></FONT></DIV>
<DIV>the configuration files are fine and they allow the
connections....but still to no avail after changing STATUS to
DEFAULT i still get the same errors. if i change STATUS to ON i dont
see the points on the map but tehre are no
errors.....<BR><BR><B><I>Doug_Newcomb@fws.gov</I></B> wrote:
<BLOCKQUOTE class=replbq
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>Wokar,<BR>Check
your postgresql.conf file to see if you are allowing
tcp/ip<BR>connections and your pg_hba.conf file to see if you are
allowing<BR>connections from 132.205.108.60<BR><BR>Doug<BR><BR>Doug
Newcomb<BR>USFWS<BR>Raleigh, NC<BR>919-856-4520 ext. 14
doug_newcomb@fws.gov<BR>---------------------------------------------------------------------------------------------------------<BR><BR>The
opinions I express are my own and are not representative of
the<BR>official policy of the U.S.Fish and Wildlife Service or Dept. of
Interior.<BR>I left my signature file in
/dev/null<BR><BR><BR>|---------+---------------------------------------------><BR>|
| w m <WOKAR1@YAHOO.COM>|<BR>| | Sent by: |<BR>| |
postgis-users-bounces@postgis.refr|<BR>| | actions.net |<BR>| | |<BR>| |
|<BR>| | 03/14/2005 02:12 PM |<BR>| | Please respond to PostGIS Users
|<BR>| | Discussion |<BR>| |
|<BR>|---------+---------------------------------------------><BR>>---------------------------------------------------------------------------------------------|<BR>|
|<BR>| To: PostGIS Users Discussion
<POSTGIS-USERS@POSTGIS.REFRACTIONS.NET>|<BR>| cc: |<BR>| Subject: Re:
[postgis-users]CONNECTION to database thru Mapserver
|<BR>>---------------------------------------------------------------------------------------------|<BR><BR><BR><BR><BR>Thanks
for your reply. when I changed my STAUS to Default it gives me
the<BR>following error:<BR><BR>msDrawMap(): Image handling error. Failed
to draw layer named 'Hotspots'.<BR>msPOSTGISLayerOpen(): Query error.
couldnt make connection to DB with<BR>connect string 'user=project
password=test dbname=Montreal<BR>host=132.205.108.60'.<BR>Error reported
was 'could not connect to server: Connection refused Is the<BR>server
running on host "132.205.108.60" and accepting TCP/IP connections
on<BR>port 5432? '.<BR>This error occured whe n trying to make a
connection to the specified<BR>postgresql server.<BR>Most commonly this
is caused by<BR>(1) incorrect connection string<BR>(2) you didnt specify
a 'user=...' in your connection string<BR>(3) the postmaster (postgresql
server) isnt running<BR>(4) you are not allowing TCP/IP connection to
the postmaster<BR>(5) your postmaster is not running on the correct port
- if its not on 5432<BR>you must specify a 'port=...'<BR>(6) the
security on your system does not allow the webserver (usually
user<BR>'nobody') to make socket connections to the post master<BR>(7)
you forgot to specify a 'host=...' if the postmaster is on a
different<BR>machine<BR>(8) you made a typo<BR>My server is running,
what I am not sure is (4) and (5). Can you please<BR>explain me how can
I check the above. Also the user name and password is<BR>the user name
and password for the database right?<BR><BR><BR><BR>pram@pramcentral.com
wrote:<BR><BR>----- Original Message -----<BR>From: "w m"<BR>To: "P
ostGIS Users Discussion"<BR>Subject: Re: [postgis-users]CONNECTION to
database thru Mapserver<BR>Date: Mon, 14 Mar 2005 09:02:56 -0800
(PST)<BR><BR>><BR>> Thank You for your response.<BR>> i made
the changes that you suggested but i still have no luck in<BR>>
displaying the points on the map. I'm not sure if a connection
is<BR>> being established to the database or not...how can i know
that??<BR>> and instead of local host i also tried to insert the ip
address of<BR>> my server but it still didnt work nor did i get any
errors.<BR>> any help would be appreciated greately<BR>> thank
you<BR>> wokar<BR>><BR>> LAYER<BR>> CONNECTIONTYPE
postgis<BR>> NAME "Spots" # my table name<BR>> CONNECTION
"user=test password=test dbname=MyDataBase host=localhost"<BR>> DATA
"the_geom FROM Spots" # the_geom column from table Spots<BR>> STATUS
ON<BR>> TYPE POINT<BR>> CLASS<BR>> COLOR 0 0 0<BR>>
OUTLINECOLOR 0 0 0<BR>> SIZE 2<BR>> END< BR>> ;
END<BR>><BR>Have you tried with STATUS DEFAULT instead of STATUS
ON<BR><BR>-Prashanth<BR>--<BR>HTMLX.com<BR>Mapserver, Mapscript, PHP
Hosting<BR><BR><BR>_______________________________________________<BR>postgis-users
mailing
list<BR>postgis-users@postgis.refractions.net<BR>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR><BR><BR>__________________________________________________<BR>Do
You Yahoo!?<BR>Tired of spam? Yahoo! Mail has the best spam protection
around<BR>http://mail.yahoo.com
_______________________________________________<BR>postgis-users mailing
list<BR>postgis-users@postgis.refractions.net<BR>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>_______________________________________________<BR>postgis-users
mailing
list<BR>postgis-users@postgis.refractions.net<BR>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR></BLOCKQUOTE></DIV>
<P>
<HR SIZE=1>
Do you Yahoo!?<BR>Yahoo! Small Business - <A
href="http://us.rd.yahoo.com/evt=31637/*http://smallbusiness.yahoo.com/resources/">Try
our new resources site!</A> </BLOCKQUOTE></BLOCKQUOTE>
<P>
<HR SIZE=1>
Do you Yahoo!?<BR>Yahoo! Small Business - <A
href="http://us.rd.yahoo.com/evt=31637/*http://smallbusiness.yahoo.com/resources/">Try
our new resources site!</A> </BLOCKQUOTE></BODY></HTML>