<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [postgis-users] I have a problem? and need help</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>The user you are connecting as ("sigtrujo" ?) does not have permission to do a select on the "sitios" table; you'll need to get the database admin to do something along the lines of "GRANT SELECT ON sitios TO <username>;".<BR>
<BR>
You may also need to add that user, the IP of the server the MMS is at and the database to allow remote connections to the pg_hba.conf file and then reload the postmaster.<BR>
<BR>
HTH,<BR>
<BR>
Greg Williamson<BR>
Senior DBA<BR>
DigitalGlobe<BR>
<BR>
Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information and must be protected in accordance with those provisions. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.<BR>
<BR>
(My corporate masters made me say this.)<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: postgis-users-bounces@postgis.refractions.net on behalf of jeviloria@cantv.net<BR>
Sent: Mon 7/21/2008 7:01 PM<BR>
To: postgis-users@postgis.refractions.net<BR>
Subject: [postgis-users] I have a problem? and need help<BR>
<BR>
Hello friends,<BR>
<BR>
<BR>
When requesting a service WMS,<BR>
<A HREF="http://www.sigtruj.org.ve/cgi-sys/mapserv?map=/home/sigtrujo/www/map/pru">http://www.sigtruj.org.ve/cgi-sys/mapserv?map=/home/sigtrujo/www/map/pru</A> eba2.map&layers=mun&mode=map<BR>
gives me the following error:<BR>
msDrawMap(): Image handling error. Failed to draw layer named 'prueba'. prepare_database(): Query error. Error declaring cursor: ERROR: permission denied for relation sitios With query string: DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from sitios WHERE the_geom && setSRID('BOX3D(-74.65 -2.465,-56.89 15.295)'::BOX3D, find_srid('','sitios','the_geom') )<BR>
<BR>
<BR>
The file Map.<BR>
<BR>
<BR>
MAP<BR>
  NAME ven_vias<BR>
  SIZE 400 400<BR>
  UNITS dd<BR>
<BR>
INTERLACE ON<BR>
<BR>
  EXTENT -74.65 -2.465 -56.89 15.295<BR>
<BR>
PROJECTION<BR>
    'init=EPSG:4189'<BR>
  END<BR>
  FONTSET<BR>
'../fonts/fonts.txt'<BR>
  SYMBOLSET '../simbolo/simbolo.txt'<BR>
 <BR>
<BR>
        WEB<BR>
                TEMPLATE "../plantilla.html"<BR>
                IMAGEPATH<BR>
"/home/sigtrujo/www/tmp/ms_tmp/"<BR>
                IMAGEURL "/tmp/ms_tmp/"<BR>
                #EMPTY<BR>
"<A HREF="http://www.sigtruj.org.ve/plantilla.html">http://www.sigtruj.org.ve/plantilla.html</A>"<BR>
                LOG<BR>
"../mapservEdenWfsIow.log"<BR>
<BR>
                METADATA<BR>
                        "wms_title"          "WMS<BR>
Demo Server" ##REQUIRED - generates warning in xml output if<BR>
missing<BR>
                        "wms_onlineresourse"<BR>
"<A HREF="http://localhost/cgi-bin/mapserv">http://localhost/cgi-bin/mapserv</A>"<BR>
                        "wms_srs"          <BR>
"init=epsg:24719"      <BR>
                END<BR>
        END #end web<BR>
<BR>
LAYER<BR>
    NAME<BR>
"prueba"<BR>
    TYPE point<BR>
    CONNECTIONTYPE postgis<BR>
    CONNECTION<BR>
"host=localhost port=5432 user=sigtrujo_test password=andrea08<BR>
dbname=sigtrujo_ve"<BR>
    DATA "the_geom FROM sitios"<BR>
    STATUS<BR>
DEFAULT<BR>
    METADATA<BR>
      'wms_title' 'sitios'<BR>
    END<BR>
  <BR>
PROJECTION<BR>
    'init=EPSG:4189'<BR>
    END<BR>
    CLASS<BR>
       NAME<BR>
'VALOR'<BR>
       STYLE<BR>
          COLOR 255 0 0<BR>
          SYMBOL<BR>
0<BR>
       END<BR>
     END<BR>
END<BR>
IMAGETYPE PNG<BR>
OUTPUTFORMAT<BR>
 <BR>
NAME PNG<BR>
   DRIVER "GD/PNG"<BR>
   MIMETYPE "image/png"<BR>
   IMAGEMODE<BR>
PC256<BR>
   EXTENSION "png"<BR>
   TRANSPARENT ON<BR>
 END<BR>
END<BR>
The tables were generated with the BD:<BR>
shp2pgsql -I -s 4019 D:\POSTGRADO\TFM\DATOS\SIGTRUJ\cit_tur_truj.shp sit_tur_truj sigtruj> sit_tur_truj.sql<BR>
<BR>
I am using MS4W and everything works well, so local,  but to stay at my web server (www.sigtruj.org.ve) gives me the error.<BR>
<BR>
<BR>
I can help solve this problem?. Thank you.<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>