Page 1 of 1
[SOLVED] Php with GRASS GIS
Posted: Wed Aug 11, 2004 1:05 pm
by sharyn
Has anyone used php with Grass GIS here? I can't seem to get it to work with php, but it works with C++.. Supposedly all you have to do is call the individual programs assiciated with Grass and it should work, but so far I can't get anything to happen.
Any help would be appreciated.
Thanks,
Sharyn
Posted: Wed Aug 11, 2004 1:13 pm
by feyd
Although I have not worked with Grass, here's a few things to check for running the executables:
make sure you are allowed to call executables from your php install. This can be found out through [php_man]phpinfo[/php_man](), looking at the disabled functions, or safe mode status can tell you.
Also, make sure that php has the proper writes to execute these programs.. It may be a good idea to post the code you are using to call them.
Posted: Mon Aug 16, 2004 1:42 pm
by sharyn
feyd,
it looks like my disabled funtions has a value of "no value" and my safe mode has a value of "off"
The code is simple "system" calls :
Code: Select all
$dmonStart = "/Applications/Grass/grass53/bin/d.mon start=PNG";
$dmonStop = "/Applications/Grass/grass53/bin/d.mon stop=PNG";
$gRegion = "/Applications/Grass/grass53/bin/g.region raster=test1";
$dRast = "/Applications/Grass/grass53/bin/d.rast -o map=test1";
system($dmonStart);
system($gRegion);
system($dRast);
system($dmonStop);
Posted: Fri Aug 20, 2004 1:59 pm
by sharyn
ok, everything is working. I just had to set permissions correctly.
- sharyn