in reply to DBI Call works from command line but not from browser

I would take it at its word: the connection is failing. You're on the right track, looking at environment variables. This is usually caused by differences in your environment when you run under CGI. It could be caused by running as a different user, or having a different PATH setting, or having some required file in the same directory that you run your command-line script from.
  • Comment on Re: DBI Call works from command line but not from browser

Replies are listed 'Best First'.
Re: Re: DBI Call works from command line but not from browser
by emma (Initiate) on Jul 16, 2002 at 14:21 UTC
    When I compare the PATH statement, they are the same. Also, even when I log on as Administrator through the browser I get the same error. Are their any environmental variables that are "assumed" at the command line that are not in the browser?

    Also, since I don't get an error when I actually connect to the database, it seems that the connection is made but just can't be maintained.

    Any ideas?

      I'm not sure how you are logging on as Administrator through the browser, but the issue I was referring to is that CGI programs generally run as the user that the web server is running as, while command-line programs run as the user you are logged in as. Sometimes this leads to problems with permissions. I've never used CGI on a Windows system, so I can't give much more advice about that.

      I suspect that your connect statement does not actually connect. You're using ODBC, and a particularly odd driver (FileMaker), so it's quite possible that it doesn't bother to actually connect until you ask it to do something like select or insert. There may not be any real connection here at all, since I think FileMaker is not a networked database.

Re: Re: DBI Call works from command line but not from browser
by emma (Initiate) on Jul 16, 2002 at 14:22 UTC
    When I compare the PATH statement, they are the same. Also, even when I log on as Administrator through the browser I get the same error. Are their any environmental variables that are "assumed" at the command line that are not in the browser?

    Also, since I don't get an error when I actually connect to the database, it seems that the connection is made but just can't be maintained.

    Any ideas?