I have a script that's working 100% fine when viewed as served by Apache. When I run it from the command line (i.e. php index.php) I get a DB connection error. Everything is the same, but when run from the command line it doesn't work. Any ideas on differences between the two methods of running the script?