Hi Folks,

I've just compiled Mapserver 4.10 for windows with Oracle Spatial support against Oracle's "instant client SDK" and "instant client basic". That seemed to go smoothly. I'm now trying to configure Mapserver and my map file with an Oracle Spatial layer. So far I haven't successfully served up my Oracle Spatial data. When I make a WMS getmap request for my layer I get back an XML error message saying this: msOracleSpatialLayerOpen(): OracleSpatial error. Cannot create OCI Handlers. Connection failure. Check the connection string. Error: ORA-12705: Cannot access NLS data files or invalid environment specified

I think my problem is with the environment variables that Mapserver and the Oracle instant client depend on. I've followed Oracle Spatial "howtos" here: http://mapserver.gis.umn.edu/docs/howto/oracle_spatial_howto
http://mapserver.gis.umn.edu/docs/howto/Configure%20Oracle%20and%20UMN

Here's a snippet from my apache httpd.conf:

<Location "/cgi-bin/">
   SetEnv ORACLE_HOME "c:/oracle_sdk/instantclient_11_1"
   SetEnv TNS_ADMIN "c:/DevSuiteHome/network/admin"
   SetEnv ORACLE_SID "MY_ORACLE"
   SetEnv PATH "c:/oracle_sdk/instantclient_11_1"
</Location>

I've also defined each of those variables directly as windows environment variables, just to be safe. Mapserver seems to pick up my tnsnames.ora file, so TNS_ADMIN is probably getting recognized. My mapfile is pasted below. Does anyone else have Oracle Spatial support working? Can you share with me which environment variables you use, how you set them, and what values you set them to?

Cheers,
Brock

MAP
 EXTENT 200000 200000 2100000 2100000
 SIZE 100 100
 UNITS meters
 WEB
   METADATA
     "wms_title" "test"
     "wms_onlineresource" ""
     "wms_srs" "epsg:4269 epsg:4326 epsg:26909 epsg:42102 epsg:3005"
     "wfs_onlineresource" ""
   END #end metadata
 END #end web
 PROJECTION
   "init=epsg:3005"
 END #end projection
 DEBUG ON

 LAYER
   NAME 'test'
       CONNECTIONTYPE oraclespatial
       CONNECTION 'user/[EMAIL PROTECTED]'
DATA 'GEOMETRY FROM MY_TABLE USING UNIQUE MAP_FEATURE_ID SRID 3005 VERSION 10g'
       CLASS
           STYLE
               COLOR 194 164 84
     END #end style
   END #end class
   TYPE line
   STATUS ON
   PROJECTION
           "init=epsg:3005"
   END
       METADATA
           "wms_title" "test"
       END #end metadata
       DEBUG ON
 END #end layer

END #end map






_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to