File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ function setup_php()
9292 $ config ['PHP_INI_PATH ' ] = $ iniPathFinal ;
9393
9494 file_put_contents ($ configFile , json_encode ($ config , JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ));
95-
95+ echo "\n" ;
9696 echo "\033[0;32m config.json updated successfully! \033[0m \n" ;
9797 return true ;
9898}
@@ -193,11 +193,14 @@ function getVersion($cmd)
193193 // Replacing placeholder
194194 $ content = str_replace ("{ " . $ key . "} " , $ value , $ content );
195195}
196+
197+
196198echo "Testing MySQL connection... \n" ;
197199
198200try {
199201 // Connessione senza specificare DB
200- $ mysqli = @new mysqli ($ params ["DB_HOST " ], $ params ["DB_USER " ], $ params ["DB_PASSWORD " ]);
202+ $ db = $ params ['DB_HOST ' ] === 'localhost ' ? '127.0.0.1 ' : $ params ['DB_HOST ' ];
203+ $ mysqli = @new mysqli ($ db , $ params ["DB_USER " ], $ params ["DB_PASSWORD " ]);
201204
202205 if ($ mysqli ->connect_error ) {
203206 throw new Exception ("Connection failed: " . $ mysqli ->connect_error );
You can’t perform that action at this time.
0 commit comments