[FGS] Error loading mapscript and using mapscript functions

Guillaume Dallaire gdallaire at mapgears.com
Tue Jul 11 21:24:07 EDT 2006


Hi,

On Fri, 2006-07-07 at 16:00 -0700, Aaron Koning wrote:
> Hello All,
> 
> I am having some problems with running a PHP file containing MapScript
> functions from the command line. I have attached the 8 line PHP script
> I am trying to run. It doesn't seem to matter what MapFile is
> referenced in the script. Note: I always run ' . /opt/fgs/setenv.sh'
> after login. 
> 
> I resolve the first error by setting the extension_dir with -d, then I
> get the second error. Can somebody reproduce these errors? I notice
> Steve Young had a similar problem in an April 2006 post:
>      http://lists.maptools.org/pipermail/foss-gis-suite/2006-
> April/000387.html
> 
> --------------- FIRST ERROR ---------------
> 
> ___Command:___
> /opt/fgs/www/cgi-bin/php4 tester.php
> 
> ___Result:___
> X-Powered-By: PHP/4.4.2
> Content-type: text/html
> 
> <br />
> <b>Warning</b>:  dl(): Unable to load dynamic library
> '/home/users/gdallaire/fgs-dev/built/ph 
> p/lib/php/extensions/no-debug-non-zts-20020429/php_mapscript.so'
> - /home/users/gdallaire/fgs-
> dev/built/php/lib/php/extensions/no-debug-non-
> zts-20020429/php_mapscript.so: cannot open shar
> ed object file: No such file or directory in
> <b>/opt/fist/bin/tester.php</b> on line <b>5</b> 
> <br />
> 


I think this is a problem with PHPRC environment variable. Check that
this file:

$FGS_HOME/etc/fgs/pkgs/php-base/setenv.sh contains:

export PHPRC=$FGS_HOME/www/conf


if no, edit it and resource the main setenv.sh file. Now PHPRC should be
correctly set to $FGS_HOME/www/conf and you shouldn't have to use the '-
d' option anymore.

> 
> --------------- SECOND ERROR ---------------
> 
> ___Command:___
> /opt/fgs/www/cgi-bin/php4 -d 'extension_dir=/opt/fgs/www/lib/php4/'
> tester.php
> 
> ___Result:___
> Segmentation Fault
> 

Can you confirm that your mapfile is working under another mapserver
runtime ?

Guillaume


-- 
________________________________________________
 Guillaume DALLAIRE      gdallaire at mapgears.com
      Mapgears              www.mapgears.com
________________________________________________



More information about the Foss-gis-suite mailing list