|
|
|
|
|
by highwind81
5573 days ago
|
|
Yeah, my solution is to have a separate config file too but have a config file solely for password and never check that file into the repository. Of course whenever someone does a fresh pull of the project, that is one file that they'd have to create for themselves. (So this is documented very clearly.) It's minor inconvenience but it solves the problems like this. |
|
SetEnv DB_USER=kermit SetEnv DB_PASS=Shhh
And then connect to the DB using code such as:
mysql_connect(getenv('DB_NAME'), getenv('DB_USER'), getenv('DB_PASS'))
Environmental config data should never be stored in source code.