List:General Discussion« Previous MessageNext Message »
From:Neil Zanella Date:June 6 2001 11:54pm
Subject:RE: Need help on mysql/php
View as plain text  
On Wed, 6 Jun 2001, Ian Ford wrote:

> Name your config file config.inc and if any of the below situations
> happen your password and username will not show up in plain text for the
> casual browser.
> (EXAMPLE:
>
> 	CONFIG.INC
> 	<?
> 		$DBname = 'test';
> 		$DBuser = 'imatest';
> 		$DBpass = 'Whatever';
> 		$DBhost = 'localhost';
> 	?>
>
> 	INDEX.PHP
> 	<?
> 		require("config.inc");
> 		$conn = mysql_connect($DBhost,$DBuser,$DBpass);
> 			  mysql_select_db($DBname);
> 	?>
>
> END EXAMPLE)
> You can place the config.inc any where you want. My preference is in a
> includes folder...

The config.inc file should still be placed outside of the document root
to guard against the security risks I described. If not then there is
nothing preventing the user from entering the full URL to config.inc.

Neil

Thread
Need help on mysql/phpEd Peddycoart5 Jun
  • RE: Need help on mysql/phpJorge Oliveira5 Jun
    • RE: Need help on mysql/phpEd Peddycoart5 Jun
      • RE: Need help on mysql/phpJorge Oliveira5 Jun
        • RE: Need help on mysql/phpPaul DuBois6 Jun
          • RE: Need help on mysql/phpEd Peddycoart6 Jun
            • RE: Need help on mysql/phpPaul DuBois6 Jun
          • RE: Need help on mysql/phpKenneth Kopelson6 Jun
            • RE: Need help on mysql/phpPaul DuBois6 Jun
        • RE: Need help on mysql/phpSommai Fongnamthip6 Jun
      • RE: Need help on mysql/phpDon Read6 Jun
        • RE: Need help on mysql/phpPaul DuBois6 Jun
        • RE: Need help on mysql/phpNeil Zanella6 Jun
  • Re: Need help on mysql/phpB. van Ouwerkerk5 Jun
  • Re: Need help on mysql/phpOlexandr Vynnychenko5 Jun
RE: Need help on mysql/phpJorge Oliveira6 Jun
  • RE: Need help on mysql/phpEd Peddycoart6 Jun
RE: Need help on mysql/phpIan Ford7 Jun
  • RE: Need help on mysql/phpNeil Zanella7 Jun
  • RE: Need help on mysql/phpAdrian D'Costa7 Jun
    • RE: Need help on mysql/phpPaul DuBois7 Jun