[Mapserver-users] PHP Mpascript PBM (W2K + Apache + PHP)

Daniel Morissette morissette at dmsolutions.ca
Fri Oct 31 09:29:12 PST 2003


Guillaume MOCCAND wrote:
> hi,
> 
> i'm trying to install PHP mapscript on my computer :
> it's W2K advanced Server + Apache 1.3.19 + PHP 4.3.3
> 
> when i put this line in my PHP code :
> dl("php_mapscript_40.dll");
> 
> i get a long list of errors :
> 
> Notice: Constant MS_TRUE already defined in d:\websites\mapserver\test.php on 
> line 2
> Notice: Constant MS_FALSE already defined in d:\websites\mapserver\test.php on 
> line 2
> Notice: Constant MS_ON already defined in d:\websites\mapserver\test.php on 
> line 2
> 
> ... and many more ...
> 

It is very likely that php_mapscript is loaded twice.  Make sure you 
don't have two dl() calls for mapscript.  Also check that you don't 
already load mapscript in your php.ini with a line like: 
'extension=php_mapscript_40.dll'

Finally, you can also use extension_loaded() to check if a module is 
already loaded before loading it again:

  if (!extension_loaded("MapScript"))
     dl("php_mapscript_40.dll");

-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the MapServer-users mailing list