[GRASS-dev] running d.mon outside grass shell with php & granting
rights problem
Paulick Consult
stefan.paulick at urbeli.com
Thu May 11 10:45:54 EDT 2006
Dear list,
when running d.mon out of a php script, I see
d.mon start=PNG:
/usr/local/grass-6.1.cvs/driver/PNG: error while loading shared libraries:
libgrass_driver.so: cannot open shared object file: No such file or
directory
Inside the grass shell, it works fine. The environment variables for PATH
and GRASS_LD_LIBRARY_PATH are pointing at the right locations (from my point
of view; the requested files ar there and accessible). I nicked the php code
from Markus' grass.itc.it/spearfish example.
Second thing:
I can't get outside-shell-access to a mapset even when calling in advance
g.access with grant for both user and group. When chowning the entire
location directory to user www-data, it works, but then there is no longer
access from the grass shell.
Now I'm stuck and confused. r.out.png works with the chowned directory. Did
I mix something up with the environment variables?
/Stefan
full php result in working order is:
system("env"):
GRASS_GNUPLOT=gnuplot -persist
GRASS_PAGER=more
GISRC=/gd/.grassrc6_php
GRASS_WISH=wish
USER=www-data
MONITOR=PNG
GRASS_PNG_COMPRESSION=1
GRASS_TRUECOLOR=TRUE
GISBASE=/usr/local/grass-6.1.cvs
PATH=/usr/lib:/usr/local/grass-6.1.cvs/lib:/usr/local/grass-6.1.cvs/driver:/
usr/local/grass-6.1.cvs/bin:/usr/local/grass-6.1.cvs/scripts:/usr/local/bin:
/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11
TCLTKGRASSBASE=/usr/local/grass-6.1.cvs/etc
_=/usr/bin/env PWD=/home/grassdata
GIS_LOCK=$$
GISRCRC=/gd/.grassrc6_php
LANG=C
GRASS_VERSION=6.1.cvs
HOME=/tmp SHLVL=2 LANGUAGE=de_DE:de:en_GB:en
GRASS_HTML_BROWSER=mozilla
GRASS_LD_LIBRARY_PATH=/usr/lib:/usr/local/grass-6.1.cvs/lib:/usr/local/grass
-6.1.cvs/driver GRASS_PERL=/usr/bin/perl
GRASS_PNGFILE=/gd/bild.png
GRASS_WIDTH=900
GRASS_GUI=tcltk
GRASS_TCLSH=tclsh g.gisenv:
GISDBASE='/gd';
GRASS_GUI='tcltk';
MAPSET='etopo5';
LOCATION_NAME='www';
systen("d.mon start=PNG"):
/usr/local/grass-6.1.cvs/driver/PNG: error while loading shared libraries:
libgrass_driver.so: cannot open shared object file: No such file or
directory
system("d.rast"):
No graphics monitor has been selected for output.
("r.out.png input=etopo5 output=bild2.png") :
rows = 180, cols = 360 Converting raw... 0% 6% 12% 18%
24% 30% 36% 42% 48% 54% 60% 66%
72% 78% 84% 90% 96% Done.
// note: image is correct dumped to file.
More information about the grass-dev
mailing list