A bit of clarification.

There are two configure.php files for each site one in in YOUR_ADMIN/includes and the other is in includes/.

Both those files need tgo reflect the settings for THAT site and database. PHP is NOT set in those two files.

Specifically, the database settings in each should be:
Code:
/** * The following settings define your database connection.
 * These must be the SAME as you're using in your admin copy of configure.php
 */
define('DB_TYPE', 'mysql'); // always 'mysql'
define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
define('DB_SERVER', 'localhost');  // address of your db server
define('DB_SERVER_USERNAME', 'Can be the same for both sites');
define('DB_SERVER_PASSWORD', 'Can be the same for both sites');
define('DB_DATABASE', 'MUST be the database name for the specific site');
There are other settings in each configure.php file that need to be "site specific" but the database settings are what make sure your site is using the correct database.