Loading ...
Sorry, an error occurred while loading the content.

2190RE: [ploticus] getdata from database with #shell and direct cgi-mode

Expand Messages
  • Stephen Grubb
    Apr 27, 2009
    • 0 Attachment
      Hello,

      To supplement what Johann said below.....

      - you should determine what UID your CGI process is running as (typically "nobody") ... and whether this UID has necessary psql permissions
      - you should determine the PATH available to your CGI process (typically quite limited) ... perhaps your process isn't able to find the psql command

      Steve

      ________________________________________
      From: ploticus@yahoogroups.com [ploticus@yahoogroups.com] On Behalf Of Platonides [platonides@...]
      Sent: Saturday, April 25, 2009 8:17 PM
      To: ploticus@yahoogroups.com
      Subject: Re: [ploticus] getdata from database with #shell and direct cgi-mode

      schatzer.johann wrote:
      > Why does this shell-construct not work in cgi-mode? It renders the plot,
      > but without data.
      >
      > #proc getdata
      > data:
      > #shell
      > psql -F, -t -ddatabase -Pformat=unaligned -c"select * from table"
      > #endshell
      >
      > #proc page
      > etcetera ...
      >
      > -----
      > The same script works fine when ploticus is invoked from the command-line.
      >
      > -----
      > If I use the output of the above database command, the cgi mode works fine.
      > #proc getdata
      > data:
      > 23 41 19 17
      > etc. ...
      >
      >

      Does psql have permission to run and connect to the db as the user under
      which the cgi is run as?
    • Show all 4 messages in this topic