Login to mysql database requires credentials. I have these credentials in a PHP class called class.DBOne.php
.
This is in the git repository on the server. I use push to deploy.
I want to share the repo with some contract developers, but I don't want them to have access to credentials.
How to soften this?
Are credentials what they should be?
Here is a snippet:
<?php
class DBOne
{
private $DB_USER = 'foo';
private $DB_PASS = 'foo';
private $DB_DRIVER = 'mysql:dbname=foo;host=localhost';
private static $database;
private function __construct()
{
$this->checkForClearDB();
try
{
self::$database = new PDO( $this->DB_DRIVER, $this->DB_USER, $this->DB_PASS );
}
catch( PDOException $pdoError )
{
echo 'pdo connection failed: ' . $pdoError->getMessage();
}
}
source
share