You are here: Re: Best practice regarding MySQL username/pw in script file?? « All PHP « IT news, forums, messages
Re: Best practice regarding MySQL username/pw in script file??

Posted by J.O. Aho on 07/16/06 12:21

dimo414 wrote:
> I agree with the suggestion to keep username/password files outside the
> web root. If you cannot do this (such as scripts like PHPBB and
> Coppermine) place the username/passwords inside a PHP file as varibles
> which can be included in any needed scripts, this way, if someone knows
> the name of the password file, and tries to view it, all they will see
> is a blank screen, as the PHP was parsed and dealt with before being
> sent out.
>

You can move the file outside the web-root too, move the file to a secure
location, create a new file with the same name in the same location and you
just add the include_once/include line to include the original configuration
file, this works fine as long as there aren't any include lines in the
original file, if there are, you need to change those to include an absolute
path to the included files instead of relative paths.


//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация