[Mapserver-users] Error with PostGIS layer

Vojtech Honzik V.Honzik at sh.cvut.cz
Thu May 6 04:02:05 EDT 2004


I upgraded PostgreSQL to 7.4.2 using PostGIS 8.0.1 and Mapserver 4.0.2,
Recompiled and installed PostGIS and Mapserver, restored the databases
from dump and tested the data using JUMP. Unfortunately, the PHP/MapScript
application gives following error:
---------
Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
'okresy'. in /var/www/systemy/systemy.php on line 488

Warning: [MapServer Error]: msPOSTGISLayerWhichShapes(): Error executing
POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR
SELECT
nazev::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text
from okresy WHERE the_geom && setSRID('BOX3D(3264599.99999771
5339999.99995129,3805400.00000459 5700000)'::BOX3D,
find_srid('','okresy','the_geom') ) -ERROR: no binary output function
available for type wkb Error with POSTGIS data variable. You specified ''.
Standard ways of specifiying are :
(1) 'geometry_column from geometry_table'
(2) 'geometry_column from (<sub query>) as foo using unique <column name>
using SRID=<srid#>'

Make sure you put in the 'using unique <column name>' and 'using SRID=#'
clauses in.

For more help, please see http://postgis.refractions.net/documentation.php

Mappostgis.c - version of Jan 23/2004. in /var/www/systemy/systemy.php on
line 488

Fatal error: Call to a member function on a non-object in
/var/www/systemy/systemy.php on line 489
---------
MapServer Version  MapServer version 4.0.2 OUTPUT=GIF OUTPUT=PNG
OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF SUPPORTS=PROJ SUPPORTS=FREETYPE
SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS
INPUT=SHAPEFILE

PHP MapScript Version  ($Revision: 1.177.2.1 $ $Date: 2003/12/12 13:31:41
$)
 ---------

I am in doubt because the only problem I see is in Mapserver to PostGIS
connector, because the another software (JUMP) operates eith the same data
correctly. Can you aim me what shall I test to fix this problem? In the
worst case I'd have to downgrate the database, but I don't think this
would be a adequate solution.

Best regards,
Vojtech Honzik




More information about the mapserver-users mailing list