Ya, I think there is a setting in Apache's conf file, but it has been quite some time that I have been mucking with apache.
Note, that most often when you can run it from the command line and it doesn't work from http, there is usialy a permissions issue. Although I have never experianced issue with modules in my @INC.