Therein lies the problem, 99% of the shared server installations out there don't provide safety from scripts running elsewhere on the server.
I'm trying to protect a customer's database username and password from prying eyes on his shared hosting account server. It's turning out to be virtually impossible the way a typical CPANEL shared server is configured.
The ease of which you can - from any account on a shared server - load up and read config files in other accounts is quite frightening.
I'm considering an article to shake up the hosting world, by writing a paper with examples of how to exploit these configurations and get access to mySQL databases all over the Internet - with nothing more than a simple account that lets me run a PHP script. Maybe this will get people's attention enough to realize that they are not safe in these environments.
What's unfortunate is that most of these people are like my client. They think they got a great deal on hosting at $30 a month, yet they are totally exposed to even the simpliest of exploits. Add to that the tendancy of applications to store plain text information, usernames and passwords into their application database, and the Internet becomes a dangerous place indeed.
-t