Strange but no one's mentioned trying to resolve the potential source of the problem itself. I've recently installed RedHat 7.1 on a machine, and also inadvertantly installed 2 versions of Perl (5.6 and 5.6.1). I, too, had the same "it works from the command-line it bombs from the webserver" problem. I fixed everything by going to /usr/bin and then doing a "./perl -MCPAN -e shell" to upgrade the 5.6 (in /usr/bin) which also had the affect of overwritting the 5.6.1 in /usr/local/bin. Once I was down to one version of Perl everything worked as expected. No weirdness. Unless you have a desperate need for two versions of Perl you might give that a try and see if it helps.