[GRASS-dev] Re: Live Earthquake Map: GRASS/PHP

Glynn Clements glynn at gclements.plus.com
Sat May 27 23:43:44 EDT 2006


Markus Neteler wrote:

> > > >>> http://grass.itc.it/spearfish/php_grass_earthquakes.php
> > > >>> Recent Earthquakes: map generated by GRASS on the fly with PHP
> > 
> > The new machine (grass.itc.it) offers PHP 5, so I had to
> > rewrite the code.
> > 
> > The new PHP5 code example is at
> >   http://grass.itc.it/spearfish/php_grass_earthquakes.php
> > and also fails!
> > 
> 
> I got a bit closer to the problem. It seems that now
> the behaviour differs from
> 
>   'GISRC' => '/grass0/neteler/www/spearfish/.grassrc6_ll',
> 
> and
>   'GISRC' => '/tmp/gisrc',
> 
> But the files are identical! The former gives a LOCATION_NAME not
> found error, the latter "permission denied" (see above link) to
> the location, although the owner of the location was changed to
> apache user/group.

But does that account have the necessary permissions? Owning the
file/directory simply means that the owner permissions are used
(rather than the group or world permissions), but those permission are
necessary.

Also, the web-server account needs execute permission on all of the
parent directories.

> Mysterious. Honestly I don't understand the GISRC/GISRCRC magic in
> $GISBASE/etc/Init.sh which I have to replicate somehow in the
> PHP script. Earlier it was the path to the .grassrc6 which worked
> on Redhat7 but now fails (RHEL4).

You don't need to set $GISRCRC. GRASS itself only uses $GISRC;
$GISRCRC should only be used within Init.sh itself (the export is
gratuitous).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list