[mapserver-users] PHP mapscript using OracleSpatial

Eichner, Andreas - SID-NLKM Andreas.Eichner at sid.sachsen.de
Fri Jul 6 00:56:15 PDT 2012


Hello Jessica,

I've tested your code successfully on PHP MapScript v5.2.0.

>  I have issues with 
> oraclespatial, and I just keep getting errors that the layer 
> can't be drawn.

What errors do you get? Something like "[...] Error: ORA-12154:
TNS:could not resolve the connect identifier specified"? Then you
might need to set some environment variables first. For example,
I set ORACLE_HOME, TNS_ADMIN, LC_CTYPE and NLS_LANG.

> The lack of error reporting from 
> php hasn't been helping matters either ;) 

You can execute your script on the command line via "php <scriptname>".
This will display errors as long as error_reporting(E_ALL) or similar
is set:
  $ php test.php 

  Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
'ASSET'.
   in /tmp/foo/test.php on line 53

  Warning: [MapServer Error]: msOracleSpatialLayerOpen(): Cannot create
OCI Handlers. Connection failure. Check the connection string.   Error:
ORA-12154: TNS:could not resolve the connect identifier specified
  .
   in /tmp/foo/test.php on line 53
  Error in msDrawMap(): Failed to draw layer named 'ASSET'.<br>

HTH


More information about the mapserver-users mailing list