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

Re: [ploticus] Script does not load data in CGI mode [2 Attachments]

Expand Messages
  • Steve Grubb
    Hello, things like this are usually issues having to do with the stark environment and unprivileged uid that web-enabled cgi apps run in... does PostgreSQL
    Message 1 of 2 , Jul 20 12:25 PM
    • 0 Attachment
      Hello, things like this are usually issues having to do with the stark environment and unprivileged uid that web-enabled cgi apps run in... does PostgreSQL require any environment vars be set /available in order to work?  Are you making any incorrect assumptions about what directory you'll be running in?  Are there file or directory permissions issues that would prevent a generic unprivileged uid (such as "nobody") from accessing necessary files?

      Steve


      On Mon, Jul 19, 2010 at 2:31 PM, <Dominic.R.Jones@...> wrote:
       
      [Attachment(s) from Dominic.R.Jones@... included below]

      I'm attempting to set up direct CGI mode using Ploticus 2.41, Apache 2.2.15, and PostgreSQL 8.3.10.  My test script (test.pl, attached) works fine when called directly or when simulating CGI mode (by setting QUERY_STRING and HTTP_COOKIE variables appropriately).  It does not load any data when run as a CGI program.
       
      The script uses the PostgreSQL psql utility to run a SQL command to obtain its data.  I have verified that the script can successfully call psql by replacing the SELECT command with an INSERT.  The INSERT successfully adds rows to a database table.
       
      The mass of commands at the top of the script are for processing the HTTP_COOKIE variable and extracting a database username and password.  As far as I can tell, they are working as well.
       
      The attached test.gif file is the output when the script is run via the command line.
       
      Here's the result from Apache's error log when the script is called via CGI:
       
      [Mon Jul 19 12:02:55 2010] [error] [client 10.16.80.164] pl proc bars: error 17: No data has been read yet w/ proc getdata \r
       
      Thanks in advance for any assistance!
       

      Dominic R. Jones, Ph.D.
      Operations Research Analyst
      SkyWest Airlines Certificate Management Office
      Federal Aviation Administration
      E-Mail: dominic.r.jones@...

      We appreciate feedback, please go to
      http://www.faa.gov/go/afsfeedback
      to leave feedback for us (select "SkyWest CMO (NM-06)" from the "Flight Standards Office" drop-down menu).

    Your message has been successfully submitted and would be delivered to recipients shortly.