GX-Bug #50497 » FindologicMySQLSocketConnectFIx.patch
src/findologic_export.php (revision ) | ||
---|---|---|
211 | 211 |
return false; |
212 | 212 |
} |
213 | 213 | |
214 |
$user = DB_SERVER_USERNAME; |
|
215 |
$pass = DB_SERVER_PASSWORD; |
|
216 |
$database = DB_DATABASE; |
|
217 |
$port = isset(explode(':', $host)[1]) && is_numeric(explode(':', $host)[1]) ? (int)explode(':', $host)[1] : null; |
|
218 |
$socket = isset(explode(':', $host)[1]) && !is_numeric(explode(':', $host)[1]) ? explode(':', $host)[1] : null; |
|
219 |
$host = explode(':', DB_SERVER)[0]; |
|
220 | ||
221 |
$connection = @($GLOBALS["___mysqli_ston"] = mysqli_connect($host, $user, $pass, $database, $port, $socket)) OR die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); |
|
222 |
((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE " . $database)) OR die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); |
|
223 | ||
224 | 214 |
$useKeywords = has_keywords(); |
225 | 215 |
if ($useKeywords) echo "Keywords used.\n"; |
226 | 216 |
else echo "Keywords not supported.\n"; |