[FGS] Error loading mapscript and using mapscript functions

Aaron Koning aaronkoning at gmail.com
Wed Jul 12 01:02:35 EDT 2006


Will test the PHPRC and report back. thx.

Actually, the mapfile runs perfectly when used in a web mapping application
using the _exact same_ FGS install (also a non-FGS linux and a windows
install). It works from the web but not from the command line. Have you
tried running the script I attached (i.e. ms_newMapObj(...)) from the
command line with a mapfile that works on your install of FGS?

Aaron

On 7/11/06, Guillaume Dallaire <gdallaire at mapgears.com> wrote:
>
> 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
> ________________________________________________
>
>


-- 
+--------------------------------------------
|  Aaron Koning
|  Information Technologist
|  Prince George, BC, Canada.
+--------------------------------------------
|  http://datashare.gis.unbc.ca/fist/
|  http://datashare.gis.unbc.ca/gctp-js/
+--------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/foss-gis-suite/attachments/20060711/064e5fdc/attachment.html


More information about the Foss-gis-suite mailing list