Page 1 of 1

Is this connection string secure on shared hosting?

Posted: Fri Feb 16, 2007 8:36 am
by amir
Hello,

We normally use connection string in this way

Code: Select all

<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
   die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
I want to know that is it secure on Shared Hosting. If not please advise how can we make it secure?

TIA!

Posted: Fri Feb 16, 2007 8:39 am
by superdezign
You mean, can people with access to your FTP see your username and password? Yes.

You could write your own encryption/decryption function and "hide" it from the other users if you really want to hide your password from them.