| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/ |
Upload File : |
<?php
/**
* Database connection test script for WordPress
*
* Parses the wp-config.php file for DB connection information and tests
* a mysql connection to the DB server and selection of the database.
*
* Place this file in the same directory as wp-config.php
*
* This script can be run from the command line:
* php /path/to/wp-mysql-test.php
*
* This script can also be called in a browser as long as the wp-config.php
* file is in a web accessible directory.
*
*/
header( 'Content-Type: text/plain' );
$wpconfig = dirname( __FILE__ ) . '/wp-config.php';
if ( ! file_exists( $wpconfig ) )
die( "wp-config.php file cannot be found, please place this script in the same directory as wp-config.php.\n" );
if ( file_exists( dirname( dirname( __FILE__ ) ) . '/wp-config.php' ) && ! file_exists( dirname( dirname( __FILE__ ) ) . '/wp-settings.php' ) )
printf( "There appears to be a wp-config.php file at %s which is\nnot part of a WordPress installation, but can be read by WordPress. Perhaps\nthe wp-config.php file at %s isn't needed?\n\n", dirname( dirname( __FILE__ ) ) . '/wp-config.php', $wpconfig );
// Tests reading from the Filesystem
$contents = file_get_contents( $wpconfig );
//Check that the contents of the file is not blank
@$link = mysql_connect( '192.168.18.20', 'fw9000157205', 'A8Moye7R08TMB2plHJsI0Ne8ingzQc' );
if ( ! $link ) {
die( sprintf( "Could not connect to the MySQL server: %s\n", mysql_error() ) );
}
echo "Connected successfully to the MySQL server\n";
@$db_selected = mysql_select_db( db3243602994, $link );
if ( ! $db_selected ) {
die ( sprintf( "Could not select the database '%s': %s\n", 'db3243602994', mysql_error() ) );
}
echo "Database selected successfully\n";
echo "\nChecking tables for errors:\n";
$tables = mysql_query( "SHOW TABLES LIKE 'wp_f8wj1jtodn_%'" );
while ( $table = mysql_fetch_array( $tables, MYSQL_NUM ) ) {
$status = mysql_fetch_row( mysql_query( "CHECK TABLE `{$table[0]}`" ) );
$message = sprintf( 'The table %s is', $status[0] );
if ( $status[3] != 'OK' ) {
printf( "\n%s NOT OK. Error: %s\n", $message, $status[3] );
} else {
printf( "%s OK\n", $message );
}
}
mysql_close( $link );