update core.php and database.php