News for hackers. Stuff that matters.
Re:How to prevent a leak like Tumblr’s by highwind81 on Saturday March 19, 2011 @10:06AM (#2343597)
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.

Re:How to prevent a leak like Tumblr’s by jcstauffer on Saturday March 19, 2011 @10:44AM (#2343695)
Our solution is to store environment-specific config data (such as DB name, username, password, etc.) in the Apache config:

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.

Re:How to prevent a leak like Tumblr’s by nbpoole on Saturday March 19, 2011 @10:07AM (#2343603)
Until someone types i?php when when creating the file ;)

Edit: Unless of course you're using YAML or some other representation rather than a pure PHP file.