File: //proc/thread-self/root/proc/self/cwd/.wpdbtest.php
<?php
header('Content-Type:text/plain');
echo "mysqli=".(int)extension_loaded('mysqli')." pdo_mysql=".(int)extension_loaded('pdo_mysql')."\n";
@include __DIR__.'/wp-config.php';
if(!defined('DB_HOST')){
echo "ERR: wp-config.php not found or unreadable\n";
exit;
}
$link = @mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if(!$link){
echo "CONNECT_ERR: ".mysqli_connect_error()."\n";
exit;
}
$res = mysqli_query($link,'SELECT DATABASE() db, VERSION() ver');
$row = $res ? mysqli_fetch_assoc($res) : [];
echo "OK DB=".(@$row['db'])." MySQL=".(@$row['ver'])."\n";
mysqli_close($link);