Will test the PHPRC and report back. thx.<br><br>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?<br><br>Aaron<br><br><div><span class="gmail_quote">On 7/11/06, <b class="gmail_sendername">Guillaume Dallaire</b> <<a href="mailto:gdallaire@mapgears.com">
gdallaire@mapgears.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>On Fri, 2006-07-07 at 16:00 -0700, Aaron Koning wrote:
<br>> Hello All,<br>><br>> I am having some problems with running a PHP file containing MapScript<br>> functions from the command line. I have attached the 8 line PHP script<br>> I am trying to run. It doesn't seem to matter what MapFile is
<br>> referenced in the script. Note: I always run ' . /opt/fgs/setenv.sh'<br>> after login.<br>><br>> I resolve the first error by setting the extension_dir with -d, then I<br>> get the second error. Can somebody reproduce these errors? I notice
<br>> Steve Young had a similar problem in an April 2006 post:<br>> <a href="http://lists.maptools.org/pipermail/foss-gis-suite/2006-">http://lists.maptools.org/pipermail/foss-gis-suite/2006-</a><br>> April/000387.html
<br>><br>> --------------- FIRST ERROR ---------------<br>><br>> ___Command:___<br>> /opt/fgs/www/cgi-bin/php4 tester.php<br>><br>> ___Result:___<br>> X-Powered-By: PHP/4.4.2<br>> Content-type: text/html
<br>><br>> <br /><br>> <b>Warning</b>: dl(): Unable to load dynamic library<br>> '/home/users/gdallaire/fgs-dev/built/ph<br>> p/lib/php/extensions/no-debug-non-zts-20020429/php_mapscript.so'
<br>> - /home/users/gdallaire/fgs-<br>> dev/built/php/lib/php/extensions/no-debug-non-<br>> zts-20020429/php_mapscript.so: cannot open shar<br>> ed object file: No such file or directory in<br>> <b>/opt/fist/bin/tester.php</b> on line <b>5</b>
<br>> <br /><br>><br><br><br>I think this is a problem with PHPRC environment variable. Check that<br>this file:<br><br>$FGS_HOME/etc/fgs/pkgs/php-base/setenv.sh contains:<br><br>export PHPRC=$FGS_HOME/www/conf
<br><br><br>if no, edit it and resource the main setenv.sh file. Now PHPRC should be<br>correctly set to $FGS_HOME/www/conf and you shouldn't have to use the '-<br>d' option anymore.<br><br>><br>> --------------- SECOND ERROR ---------------
<br>><br>> ___Command:___<br>> /opt/fgs/www/cgi-bin/php4 -d 'extension_dir=/opt/fgs/www/lib/php4/'<br>> tester.php<br>><br>> ___Result:___<br>> Segmentation Fault<br>><br><br>Can you confirm that your mapfile is working under another mapserver
<br>runtime ?<br><br>Guillaume<br><br><br>--<br>________________________________________________<br> Guillaume DALLAIRE <a href="mailto:gdallaire@mapgears.com">gdallaire@mapgears.com</a><br> Mapgears
<a href="http://www.mapgears.com">www.mapgears.com</a><br>________________________________________________<br><br></blockquote></div><br><br clear="all"><br>-- <br>+--------------------------------------------<br>| Aaron Koning
<br>| Information Technologist<br>| Prince George, BC, Canada.<br>+--------------------------------------------<br>| <a href="http://datashare.gis.unbc.ca/fist/">http://datashare.gis.unbc.ca/fist/</a><br>| <a href="http://datashare.gis.unbc.ca/gctp-js/">
http://datashare.gis.unbc.ca/gctp-js/</a><br>+--------------------------------------------