mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENH: Some webhosters require username/password credentials to test for
existing DB server
This commit is contained in:
parent
ccbcb386e7
commit
3c09e9dfc4
@ -29,7 +29,7 @@ class MySQLDatabaseConfigurationHelper implements DatabaseConfigurationHelper {
|
|||||||
public function requireDatabaseServer($databaseConfig) {
|
public function requireDatabaseServer($databaseConfig) {
|
||||||
$success = false;
|
$success = false;
|
||||||
$error = '';
|
$error = '';
|
||||||
$conn = @mysql_connect($databaseConfig['server'], null, null);
|
$conn = @mysql_connect($databaseConfig['server'], $databaseConfig['username'], $databaseConfig['password']);
|
||||||
if($conn || mysql_errno() < 2000) {
|
if($conn || mysql_errno() < 2000) {
|
||||||
$success = true;
|
$success = true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user