in reply to Re: Output of CGI with DBI
in thread Output of CGI with DBI

Thanks... I guess by command line I meant I'm sshing into the web server and running the CGI script and get the correct output, so I thought the environment would be the same. I tried checking the return values, but I can't get ANY sort of output from the web after the connection should be established.

Replies are listed 'Best First'.
Re^3: Output of CGI with DBI
by roboticus (Chancellor) on Jul 08, 2010 at 18:03 UTC

    brp4h:

    You can definitely ssh into the webserver, but for it to do you any good, you have to ssh into it using the same account that the webserver is running. Otherwise, it will have its own path and other environment variables. Heck, it could even be running a different perl than your account. So unless you're running under the webserver account, running it at the command line won't tell you much.

    ...roboticus

      Thanks, roboticus. The DB connection fails with this message: Total Environment allocation failure! Did you set up your DB2 client environment? That's because the webserver account doesn't have the client enviroment set up, even though my account on the webserver does?

        brp4h:

        Yes, that's what it sounds like. Normally, a webserver account runs with the minimum configuration and permissions required to do the job, to provide less capability for hackers to attack. Once you set up the webserver account with the DB2 client software, you'll probably get further along.

        ...roboticus