[Mapserver-users] mapscript
Paul Dymecki
millardymecki at sympatico.ca
Fri Mar 14 07:42:27 PST 2003
Thanks on both counts,
I already tried the call you mentioned but the script seems to die when
i include any mapscript code ie. includeing the following line crashes the
script: My call looks like this: (c:\>php -q myProg.php hello) ,but hello
never gets printed to the screen when the lines previous to the argv call
are included.
Paul
if (PHP_OS == "WINNT" || PHP_OS == "WIN32")
{
dl("php_mapscript_36.dll");
}
else
{
dl("php_mapscript.so");
}
$map = ms_newMapObj("tutorial.map");
$argv = $_SERVER['argv'] ;
echo $argv[1] ;
thx,
Paul
----- Original Message -----
From: "Daniel Morissette" <morissette at dmsolutions.ca>
To: "Paul Dymecki" <millardymecki at sympatico.ca>
Cc: "MapServer List (E-mail)" <mapserver-users at lists.gis.umn.edu>
Sent: Friday, March 14, 2003 9:54 AM
Subject: Re: [Mapserver-users] mapscript
> > Paul Dymecki wrote:
> >
> > I was wondering if anyone has tried running mapscript code from a
> > php prog running through the command line? I'm trying to call a
> > php-mapscript program from perl, and not sure what the best approach
> > would be?
>
> Yes, that's possible. Assuming you have a php CGI, you would use:
>
> /path/to/php -q /path/to/yourscript.php arg1 arg2 arg3 ...
>
> This will run yourscript.php at the command line, and the args will be
> available in the $_SERVER["argv"] array. The first item in this array
> is the name of the script itself. The -q option is to suppress output
> of the CGI headers.
>
> --
> ------------------------------------------------------------
> Daniel Morissette morissette at dmsolutions.ca
> DM Solutions Group http://www.dmsolutions.ca/
> ------------------------------------------------------------
More information about the MapServer-users
mailing list