[MS4W-Users] Problems with php-mapscript and postgis-layers from different databases

Daniel Morissette dmorissette at mapgears.com
Thu Jul 29 13:12:02 EST 2010


Jeff McKenna wrote:
> 
> 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.
> 

I see no reason why MapServer would (or even could) reuse a connection
already established by the calling PHP Script.

I'd suggest you double-check to make sure your mapfile does not contain
the wrong connection string in one of your layers, and that your script
does not happen to override the layer->connection value for one of your
layers, and if that's not the source of the problem then you'll have to
share a small test case (PHP script + mapfile), ideally with a single
layer definition in it that reproduces the problem and that can be used
to identify and fix it.

BTW, which version of MapServer are you using?

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/


More information about the MS4W-Users mailing list