HOw to prevent simple password readout by viewing source
am 08.03.2006 17:12:42 von Mark Donners
Can anyone tell me how i can prevent that users can see my connection string
to mysql database?
Using my browser i could easely use the function: view source.....showing
the html/php code.
IF the file includes the connection string than anyone could see my database
name and password.....
How can i prevent this??
Please help.
Mark
Re: HOw to prevent simple password readout by viewing source
am 08.03.2006 17:54:17 von Bodo Kaelberer
Hello Mark!
Mark@home am Wed, 8 Mar 2006 17:12:42 +0100:
> Can anyone tell me how i can prevent that users can see my connection string
> to mysql database?
>
> Using my browser i could easely use the function: view source.....showing
> the html/php code.
>
> IF the file includes the connection string than anyone could see my database
> name and password.....
The source you see in your browsers source-view is the html-source the
script produced and not the php-source of the script itself.
Usually there is no need to mention account-information in the
html-source because such information is used internally inside the
script.
Do you really see the information in the html-source or are you just
afraid that it might happens?
Greeting
Bodo
--
Re: HOw to prevent simple password readout by viewing source
am 10.03.2006 16:29:56 von Hendrik Pilz
Mark@home wrote:
> Can anyone tell me how i can prevent that users can see my connection string
> to mysql database?
>
> Using my browser i could easely use the function: view source.....showing
> the html/php code.
>
> IF the file includes the connection string than anyone could see my database
> name and password.....
>
> How can i prevent this??
>
Write your connection settings in a file outside of your webservers
document root and include that file with php.
best regards, Hendrik