faq how to hide db-password from php script?
klaus3b への返信
I am creating a php web-app/web-service with mysql database access that should become opensource. Currently i have to put 2 php variable $dbuser=... and $dbpassword=... into the script to connect to the osdn database so everbody who gets the source code for the script will know my osdn-username/osdn password. what is the osdn prefered way to handle this issue?
You would set correct permission to these kind of file to hide (can not read ) from non project members.
For example for project 'foo', target file 'bar'
In this stuation you can change permission the filr bar as bellow:
chmod 640 bar
I am creating a php web-app/web-service with mysql database access that should become opensource.
Currently i have to put 2 php variable $dbuser=... and $dbpassword=... into the script to connect to the osdn database
so everbody who gets the source code for the script will know my osdn-username/osdn password.
what is the osdn prefered way to handle this issue?
Since i donot have the permission to create database users like
i cannot add an additional database user that does not have my osdn-login credentials.
my proposal to solve this issue.
every project gets two database users: one project-db-admin user that can create/modify tables and one aditional project-db-webuser that can receive grants from the project-db-admin user.
It would be nice if this issue is documented in https://osdn.jp/projects/docs-en/wiki/ProjectWebDB_FAQ
Note: i cannot assign this ticket to a component because the component names are in japanese and i donot speak japanese