Skip to content

Commit a334d72

Browse files
committed
use specified port
1 parent b63b458 commit a334d72

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dvwa/includes/DBMS/MySQL.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@
1010
define( 'DVWA_WEB_PAGE_TO_ROOT', '../../../' );
1111
}
1212

13-
if( !@($GLOBALS["___mysqli_ston"] = mysqli_connect( $_DVWA[ 'db_server' ], $_DVWA[ 'db_user' ], $_DVWA[ 'db_password' ] )) ) {
13+
if( !@($GLOBALS["___mysqli_ston"] = mysqli_connect( $_DVWA[ 'db_server' ], $_DVWA[ 'db_user' ], $_DVWA[ 'db_password' ], "", $_DVWA[ 'db_port' ] )) ) {
1414
dvwaMessagePush( "Could not connect to the database service.<br />Please check the config file.<br />Database Error #" . mysqli_connect_errno() . ": " . mysqli_connect_error() . "." );
1515
if ($_DVWA[ 'db_user' ] == "root") {
1616
dvwaMessagePush( 'Your database user is root, if you are using MariaDB, this will not work, please read the README.md file.' );
1717
}
1818
dvwaPageReload();
1919
}
2020

21-
2221
// Create database
2322
$drop_db = "DROP DATABASE IF EXISTS {$_DVWA[ 'db_database' ]};";
2423
if( !@mysqli_query($GLOBALS["___mysqli_ston"], $drop_db ) ) {

0 commit comments

Comments
 (0)