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.