[fix] test bootstrap : broken mysql config
This commit is contained in:
parent
ee71a5a001
commit
9238572dad
|
@ -88,8 +88,9 @@ if ( is_readable("my.cnf") ) {
|
||||||
$mysqlConfigFile = file("my.cnf");
|
$mysqlConfigFile = file("my.cnf");
|
||||||
} else if(is_readable('my.cnf_generic')){
|
} else if(is_readable('my.cnf_generic')){
|
||||||
$mysqlConfigFile = file('my.cnf_generic');
|
$mysqlConfigFile = file('my.cnf_generic');
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($mysqlConfigFile as $line) {
|
foreach ($mysqlConfigFile as $line) {
|
||||||
if (preg_match('/^([A-Za-z0-9_]*) *= *"?(.*?)"?$/', trim($line), $matches)) {
|
if (preg_match('/^([A-Za-z0-9_]*) *= *"?(.*?)"?$/', trim($line), $matches)) {
|
||||||
switch ($matches[1]) {
|
switch ($matches[1]) {
|
||||||
case "user":
|
case "user":
|
||||||
|
@ -106,7 +107,6 @@ if ( is_readable("my.cnf") ) {
|
||||||
if (preg_match('/^#alternc_var ([A-Za-z0-9_]*) *= *"?(.*?)"?$/', trim($line), $matches)) {
|
if (preg_match('/^#alternc_var ([A-Za-z0-9_]*) *= *"?(.*?)"?$/', trim($line), $matches)) {
|
||||||
$$matches[1] = $matches[2];
|
$$matches[1] = $matches[2];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue