[MS4W-Users] Problems with php-mapscript and postgis-layers from different databases
jmckenna at gatewaygeomatics.com
Thu Jul 29 06:58:55 EST 2010
I don't maintain PHPMapScript so I don't have an official answer for
you. You might want to send this message to the mapserver-dev email
list, where the developers live
My guess though is that once you open a connection with PHP through
pg_connect, those credentials will always be used by PHP (no matter if
it is mapscript or whatever) until you close the connection with pg_close.
MapServer Consulting and Training Services
Ludwig Kniprath wrote:
> Hi all,
> following problem:
> I'm using PHP-Mapscript for displaying some postgis-layers. I store
> geo-data and application-data in different schemas of the same database
> and had no problems so far.
> For storing OpenStreetMap-Data I tried to use another database ('osm')
> and configured my mapfile-layer with "CONNECTION ... dbname=osm...", but
> the data didn't render so far.
> Setting "DEBUG 5" at layer-level showed the reson for this behaviour:
> Although the layer was defined with
> CONNECTION "user=postgres password=postgres dbname=gis host=localhost
> the log-file says:
> [Wed Jul 28 15:16:08 2010].429000 msPostGISLayerOpen: No connection in
> pool, creating a fresh one.
> [Wed Jul 28 15:16:08 2010].507000
> password='my_dummy_pw' dbname='wver_ims' host='127.0.0.1'
> Why does PHP-Mapscript ignore the layer-connection-settings in the
> mapfile and reuses the credentials of the established connection from
> the calling php-script?
More information about the MS4W-Users