Skip to content

Commit

Permalink
Fixed for phpfog
Browse files Browse the repository at this point in the history
  • Loading branch information
stevedufresne committed Aug 11, 2012
1 parent 29837bc commit 27f3f00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/db.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@

$user = getenv('MYSQL_USERNAME');
$pass = getenv('MYSQL_PASSWORD');
$name= getenv('MYSQL_DB_NAME');
$host= getenv('MYSQL_DB_HOST');


$data_source = sprintf('mysql:host=%s;dbname=%s', $host, $name );


$data_source = 'mysql:host=' . getenv('MYSQL_DB_HOST') . ';dbname=' . getenv('MYSQL_DB_NAME').'';
//PDO -> php data objects
$db = new PDO($data_source, $user, $pass);
//Make the connection to speak in UTF 8 - don't expect anything back
Expand Down

0 comments on commit 27f3f00

Please sign in to comment.