Don't forget that PHP has access to some other very useful variables, for example $PHP_SELF or better yet, $SCRIPT_FILENAME. (can some of you see where I'm going with this?) If you encrypt your password in such a way that you can ONLY decrypt it with a certain $SCRIPT_FILENAME value, then the only way to get to the database is to run that *particular* script and no others.
Now you remember from the above post, that yes, encrypting and hiding is one thing, but what about someone just running your script and extracting data with it?
First, you place this script in a directory that is readable (not writable) only by you and the 'nobody' PHP user just for basic protection.
Second, you imagine just how another user would go about abusing this script. Set your script up so that you will be warned by email (or some other method) if anyone is doing anything different from a standard operation.
Third, you make it so that script will only run to save data, and to display data only in carefully limited ways. Any script that you as an administrator want to use to actually view all your data, should be running in secure server mode (
and require browser-based password entry, so the password does not even reside on the server.
Of course this will take some work, and nothing residing on a server where there are other users is going to be completely bulletproof, but these methods should take some work to crack.