php mapscript error

Aaron Racicot aaronr at Z-PULLEY.COM
Fri Nov 3 17:12:33 EST 2006


You need INPUT=OGR to have access to vector functions in GDAL/OGR via
Mapserver.  It looks like you only have GDAL enabled.  Look at the
--with-ogr switch when building Mapserver.

A

+----------------------------------------+
| Aaron Racicot  | aaronr at ecotrust.org   |
| GIS Programmer | 360.221.2441          |
+----------------------------------------+
| e c o t r u s t                        |
| Jean Vollum Natural Capital Center     |
| 721 NW Ninth Avenue                    |
| Suite 200                              |
| Portland, OR 97209                     |
| www.ecotrust.org                       |
+----------------------------------------+ 
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Kipp Jones
Sent: Friday, November 03, 2006 1:56 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] php mapscript error

This may be a configuration error, but I'm stumped.  I'm getting an error
when trying to use ogr to connect to mysql via phpmapscript.  The error:

PHP Warning:  [MapServer Error]: msOGRLayerOpen(): OGR support is not
available.

I'm running on Mac OS X 10.4.8.

Things seem to be happy, gmap is working just fine.  

My output from phpinfo shows:

MapServer Version
MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=THREADS INPUT=EPPL7 INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
PHP MapScript Version
($Revision: 1.260 $ $Date: 2006/09/06 16:42:36 $)


The layer in my map is pretty simple:
LAYER
    NAME "scanner"
    STATUS DEFAULT
    TYPE POINT
    CONNECTIONTYPE OGR
    CONNECTION "/Users/kippster/tiger/scanner.ovf"
    DATA "scanner"
    CLASS
       NAME "scanner"
           STYLE
               SYMBOL 2
               SIZE 15
               COLOR 0 255 0
           END
    END
END


My ovf file is:

<OGRVRTDataSource>
    <OGRVRTLayer name="scanner">
       
<SrcDataSource>MYSQL:db,user=xxxx,password=xxxxxx,host=127.0.0.1,port=3306,t
ables=GpsLogs</SrcDataSource> 
        <SrcSQL>SELECT scannerId, latitude, longitude FROM GpsLogs</SrcSQL> 
        <GeometryType>wkbPoint</GeometryType>
        <GeometryField encoding="PointFromColumns" x="latitude"
y="longitude"/> 
    </OGRVRTLayer>
</OGRVRTDataSource>


When I perform ' ogrinfo /Users/kippster/tiger/scanner.ovf -al' it spews out
all of the data points in the db just fine.


Any ideas?

Thanks!

Kipp



More information about the mapserver-users mailing list