[mapserver-users] Postgis conexion Error

Karlinhos carlos.rosado.perez at gmail.com
Tue Nov 8 01:54:36 PST 2011


Hi, in my php script I use something like that:

/
	$Poligono1 = ms_newLayerObj($mapObject);
	$Poligono1->set( "name", "Capa de todo");
	$Poligono1->set( "type", MS_LAYER_POLYGON);
	$Poligono1->set( "status", MS_ON);
	
	$Poligono1->set("connectiontype",MS_POSTGIS);
	$Poligono1->set("connection","user=postgres password=**** dbname=****
host=localhost");
	$Poligono1 ->set("data","the_geom FROM public.concellos using unique gid
using srid=23030");
/

Ok, The problem is in the line connection..... the error message is this ->

* /Fatal error: Uncaught exception 'MapScriptException' with message
'Property 'connectiontype' is read-only and cannot be set.' in
C:\ms4w\Apache\htdocs\test10.php:30 Stack trace: #0
C:\ms4w\Apache\htdocs\test10.php(30): layerObj->set('connectiontype',
'POSTGIS') #1 {main} thrown in C:\ms4w\Apache\htdocs\test10.php on line 30/*

Can anybody help me with this connection ? ? ?
I use MS4W, in WINxp :( , and a postgis db in localhost.
Thanks in advance!

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Postgis-conexion-Error-tp6973720p6973720.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the MapServer-users mailing list