Re: Password in connection string
| From: | daniel at electroteque dot org | Date: | Mon, 12 May 2003 00:41:05 +0000 |
| Subject: | Re: Password in connection string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147242@lists.php.net to get a copy of this message | ||
i usually have connection settings within a file outside the web dir and
include it that way so its lookes something like
<?
$pass = "pass";
$user = "user";
$database = "database";
$host = "localhost";
?>
what would be good is to even transfer the pass via md5 is there any
possibilties ? maybe this is a mysql specific question
> I'm using PEAR and a MySQL database. My connection string contains
> <user>:<password> and works fine. But I don't like having passwords in
> clear text. Is there any way for me to not have to code the password
> but instead let MySQL find it in a my.cnf file?
>
> I've tried with <user>=mysql, which is the owner of mysqld, and I've
> put the password in the [client] section of mysql's home directory.
> What's happening is that by omitting the password in the connection
> string, the connection is attempted with "using password=NO". This is
> unlike the behavior of other clients for mysql.
>
> Is there any way to do this?
>
> BTW, I've found one "solution" to be: put the setting of the
> connection string, which is a $_SESSION variable, in a file that's not
> in the document root, then REQUIRE that file.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php