[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gplt/gf problems through cgi



Mike,

You might try temporarily setting the script to use the "ps" driver
instead of gf. The ps driver won't use the X display of course, so if that
succeeds, then it would point to your X connection that gf is trying to
connect to. If it fails, then there is a problem in the www-data environment
for running the script.

if a normal user succeeds when drawing to the Xvfb display, then the depth
is correctly set as 8 bits. Otherwise, check that.

Generally the Xvfb uses a host list or permissioning on who can draw to it.
I don't know if there is any configuration for user access as well.

Have you tried becoming the www-data user (eg su - www-data" so that you can
run the script as the user that would be executing the cgi? That would 
determine 
if there are any permission problems- remember that gemglb.nts and last.nts need
to be written too. Does the script cd to a working space that might have been
worked in by the user executing the script first? 

Steve Chiswell
Unidata User Support




On Mon, 18 Mar 2002, Hardiman, Michael P wrote:

> Hi folks,
>  
> I've run into a very annoying problem recently in trying to use CGI and
> Gempak (still using 5.4) to plot forecast soundings "on-demand."
> Basically, what is going on is the script works perfectly when executed
> in the shell by a normal user, but when you switch to CGI, it crashes
> after calling the "gplt" function, and you end up getting stuck with a
> defunct GF process.  All variables are being passed correctly, gempak's
> gdplot program is called correctly, it all comes down to trying to
> create the gif file.
>  
> Originally, we had been utilising a VNC session for creating the
> graphics, but we suspected that there might be a permissioning problem
> in that only one user is allowed to access the VNC session.  When using
> the CGI interface through the web, a (special?) user called "www-data"
> executes the commands, etc.  So we started using an Xvfb session running
> on a random display (:8 I believe).  Same problem.
>  
> I'm convinced that this has something to do with the "www-data" being
> some sort of "special" user that is running into permissioning problems
> in trying to use the Xvfb display, or maybe there's something in the
> gplt or gf function thats causing the problem.  This is being run on a
> Debian Linux 2.2 PC system, with a webserver called "Xitami," and as I
> said before, Gempak 5.4.
>  
> If anyone can shed some light on this, it would be greatly appreciated.
> If it would help to see the script, I can send it on request.  I don't
> want to bog down the list with unnecessary attachments.
>  
> Thanks.
> -Mike
>