Re: PHP MySQL password

From: Date: Wed, 31 Jan 2001 02:22:21 +0000
Subject: Re: PHP MySQL password
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37402@lists.php.net to get a copy of this message
One way to handle this is to put your password (along with any other database details) into a config file (eg. yoursite.cfg) and include/require this file in your script. The config file can then be stored outside the web tree, and referred to with an absolute path. Mick On Tue, 30 Jan 2001, Egan wrote: > I know that ~.my.cnf with > > [client] > password={mypass} > > is the recommended method of securing your MySQL password when using a > shell command line to access MySQL. > > But what is the recommended method for MySQL password security via > PHP? Is there some way to make it use the ~.my.cnf file? > > It seems to me that if you hardcode a MySQL password into your PHP > source code, it could become exposed inadvertently. > > > Egan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#37402) next »