-     [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]

current_userid ): ?>

   |    current_userid; $user = WPF()->member->get_member( $wpfu ); $usermeta = get_user_meta( $wpfu ); ?> :  

 

$problem ): ?>
 
 

phpMyAdmin Database Manager > WordPress Database > SQL Tab. In case you\'re not familiar with hosting service tools, please contact to your hosting service support team and forward them this message with the SQL command.', 'wpforo'), '[' . __('Solve database problems', 'wpforo') . ']' ) ?>

';
                                                        $SQL = wpforo_database_fixer( $problems );
                                                        if(wpfval($SQL, 'fields')){
                                                            foreach( $SQL['fields'] as $query ) echo $query . '
'; } if(wpfval($SQL, 'keys')){ foreach( $SQL['keys'] as $query ) echo $query . '
'; } if(wpfval($SQL, 'tables')){ foreach( $SQL['tables'] as $query ) echo $query . '

'; } echo 'SET AUTOCOMMIT = 1;'; } ?>

 

tables as $table ){ wpforo_table_info($table); } ?>

USER AGENT
Web Server
PHP Version
MySQL Version db->db_version(); ?>
PHP Max Post Size
PHP Max Upload Size
PHP Memory Limit
PHP DateTime Class ' . __('Available', 'wpforo') . '' : '' . __('The setTimestamp() method of PHP DateTime class is not available. Please make sure you use PHP 5.4 and higher version on your hosting service.', 'wpforo') . ' | more info»'; ?>
PHP cURL Module ' . __('Available', 'wpforo') . '' : '' . __('Not available', 'wpforo') . ' ( ' . __('Please contact to your hosting service support team and ask them enable PHP cURL module') . ' ) | more info»'; ?>
Permalinks / mod_rewrite ' . __('Available', 'wpforo') . '' : '' . __('Not enabled', 'wpforo') . ' ( ' . __('Please enable mod_rewrite on your server, this is required for wpForo forum') . ' ) | more info»'; ?>

 
$v ) { if( (!empty($keys) && !in_array($k, $keys) && strpos($k,'capabilities') === FALSE ) || $k == 'user_pass' ) continue; if ( is_serialized($v) || is_array($v) ){ $v = ( is_array($v) ) ? $v : @unserialize($v); $v_html = ''; if( is_array($v) && !empty($v) ){ foreach ($v as $kk => $vv ) { if ( is_serialized($vv) || is_array($vv) ){ $v_html = ''; $vv = ( is_array($vv) ) ? $vv : unserialize($vv); if( $k == 'wpf_read_topics' ){ $v_html .= "" . count($vv) . " "; } else { if( is_array($vv) && !empty($vv) ){ foreach ($vv as $kkk => $vvv ) { if( is_array($vvv) ) $vvv = implode('   |   ', $vvv); $v_html .= "" . $kkk . ': ' . wp_unslash($vvv) . "   |   "; } } } } else{ $v_html .= "" . $kk . ': ' . $vv . "   |   "; } } } $v = $v_html; } if( $v == '' ) $v = 'null'; $html .= "
" . $k . ': ' . wp_unslash($v) . "
"; } return $html . "
"; } function wpforo_table_info( $table ){ $_table_exists = WPF()->db->get_var("SHOW TABLES LIKE '" . esc_sql($table) ."'" ); if( $_table_exists ){ $result = WPF()->db->get_results("SHOW FULL COLUMNS FROM " . esc_sql($table), ARRAY_A); $count = WPF()->db->get_var("SELECT COUNT(*) FROM " . esc_sql($table) ); $status = WPF()->db->get_row("CHECK TABLE " . esc_sql($table), ARRAY_A); echo ''; echo ''; echo ''; echo '
'; echo ''; echo ''; foreach( $result as $info ){ echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo '
' . $table . '  |  Rows: ' . $count . '  |  Status: ' . $status['Msg_text'] . '
' . $info['Field'] . '' . $info['Type'] . '' . $info['Collation'] . '' . ( $info['Null'] == 'NO' ? '-' : 'NULL' ) . '' . $info['Key'] . '' . $info['Default'] . '
'; echo '
'; $result = WPF()->db->get_results("SHOW INDEXES FROM " . esc_sql($table), ARRAY_A); echo ''; echo ''; $indexes = array(); foreach( $result as $info ){ $indexes[ $info['Key_name'] ]['Key_name'] = $info['Key_name']; $indexes[ $info['Key_name'] ]['Column_name'][] = $info['Column_name']; $indexes[ $info['Key_name'] ]['Non_unique'] = $info['Non_unique']; $indexes[ $info['Key_name'] ]['Index_type'] = $info['Index_type']; } foreach( $indexes as $info ) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo '
Indexes
' . $info['Key_name'] . '' . implode( ', ', $info['Column_name'] ) . '' . ( $info['Non_unique'] ? '0' : 'Un' ) . '' . $info['Index_type'] . '
'; echo '
'; }else{ echo '

Table ' . $table . ' doesn\'t exist

'; } } function wpforo_issues(){ $issues = array(); ########################################################## //Usergroups////////////////////////////////////////////// $guest_exists = WPF()->db->get_var("SELECT `groupid` FROM `" . WPF()->tables->usergroups . "` WHERE `groupid` = 4"); if( !$guest_exists ){ $issues['usergroup']['guest']['level'] = 3; $issues['usergroup']['guest']['message'] = __('The default Guest usergroup is not found!', 'wpforo'); $issues['usergroup']['guest']['solution'] = __('Please execute this SQL in your Website Hosting cPanel > phpMyAdmin Database Manager', 'wpforo') . ":
" . 'INSERT INTO `' . WPF()->tables->usergroups . '` (`groupid`, `name`, `cans`, `description`, `utitle`, `role`, `access`, `color`, `visible`, `secondary`) VALUES
(4, \'Guest\', \'a:32:{s:2:\"mf\";s:1:\"0\";s:2:\"ms\";s:1:\"0\";s:2:\"mt\";s:1:\"0\";s:2:\"mp\";s:1:\"0\";s:3:\"mth\";s:1:\"0\";s:2:\"vm\";s:1:\"0\";s:3:\"aum\";s:1:\"0\";s:2:\"em\";s:1:\"0\";s:3:\"vmg\";s:1:\"0\";s:3:\"aup\";s:1:\"0\";s:4:\"vmem\";s:1:\"1\";s:4:\"vprf\";s:1:\"1\";s:4:\"vpra\";s:1:\"1\";s:4:\"vprs\";s:1:\"0\";s:2:\"bm\";s:1:\"0\";s:2:\"dm\";s:1:\"0\";s:3:\"upa\";s:1:\"0\";s:3:\"ups\";s:1:\"0\";s:2:\"va\";s:1:\"1\";s:3:\"vmu\";s:1:\"0\";s:3:\"vmm\";s:1:\"0\";s:3:\"vmt\";s:1:\"1\";s:4:\"vmct\";s:1:\"1\";s:3:\"vmr\";s:1:\"1\";s:3:\"vmw\";s:1:\"0\";s:4:\"vmsn\";s:1:\"1\";s:4:\"vmrd\";s:1:\"1\";s:3:\"vml\";s:1:\"1\";s:3:\"vmo\";s:1:\"1\";s:3:\"vms\";s:1:\"1\";s:4:\"vmam\";s:1:\"1\";s:4:\"vwpm\";s:1:\"0\";}\', \'\', \'Guest\', \'\', \'read_only\', \'#222222\', 0, 0);
' . "
"; } $perms = array(); $nonsec = array( 'mf' => __( 'Dashboard - Manage Forums', 'wpforo' ), 'ms' => __( 'Dashboard - Manage Settings', 'wpforo' ), 'mt' => __( 'Dashboard - Manage Tools', 'wpforo' ), 'vm' => __( 'Dashboard - Manage Members', 'wpforo' ), 'aum' => __( 'Dashboard - Moderate Topics & Posts', 'wpforo' ), 'vmg' => __( 'Dashboard - Manage Usergroups', 'wpforo' ), 'mp' => __( 'Dashboard - Manage Phrases', 'wpforo' ), 'mth' => __( 'Dashboard - Manage Themes', 'wpforo' ), 'em' => __( 'Dashboard - Can edit member', 'wpforo' ), 'bm' => __( 'Dashboard - Can ban member', 'wpforo' ), 'dm' => __( 'Dashboard - Can delete member', 'wpforo' ), 'vmu' => __( 'Front - Can view member username', 'wpforo' ) ); $default_ug = WPF()->usergroup->default_groupid; $default_ug_cans = WPF()->db->get_var("SELECT `cans` FROM `" . WPF()->tables->usergroups . "` WHERE `groupid` = " . intval($default_ug) ); $default_ug_cans = unserialize($default_ug_cans); if( !empty($default_ug_cans) ){ foreach( $default_ug_cans as $key => $value ){ if( wpfkey($nonsec, $key) && $value == 1 ) { $perms[] = $nonsec[$key]; } } if( !empty($perms) ){ $cans = ''; $issues['usergroup']['default_perm']['level'] = 3; $issues['usergroup']['default_perm']['message'] = __('New registered users get access to forum settings!', 'wpforo'); $issues['usergroup']['default_perm']['solution'] = __( sprintf('Please navigate to Forums > Usergroups admin page, edit the "Default" usergroup (ID = %s) and uncheck/disable following permission(s):', $default_ug), 'wpforo') . $cans; } } ######################################################### //Plugin Conflicts/////////////////////////////////////// if( class_exists('autoptimizeCache') ){ $autopt = get_option('autoptimize_js_exclude'); if( $autopt && strpos($autopt, 'wp-includes/js/tinymce') === FALSE ){ $issues['conflicts']['autoptimize']['level'] = 3; $issues['conflicts']['autoptimize']['message'] = __('Conflict with Autoptimize plugin!', 'wpforo'); $issues['conflicts']['autoptimize']['solution'] = __('Please navigate to Settings > Autoptimize > Main Tab, click on top right [Show advanced settings] button, find "Exclude scripts from Autoptimize" option, add this JS path ,wp-includes/js/tinymce, than click on [Save Changes and Empty Cache] button bellow.', 'wpforo'); } } ######################################################### //Email Issues ////////////////////////////////////////// $email = "test@example.com"; $subject = "Email Test"; $message = "This is a mail testing email function on server"; if( !wp_mail($email, $subject, $message) ){ $issues['email']['wp_mail']['level'] = 3; $issues['email']['wp_mail']['message'] = __('WordPress Email sending function wp_mail() doesn\'t work!', 'wpforo'); $issues['email']['wp_mail']['solution'] = __('In most cases this is a server issue. We recommend you contact to your hosting service support team or open a support topic in wordpress.org support forum. Also there are many good articles regarding this issue in web. For example ', 'wpforo') . ' - ' . __('How to Fix WordPress Not Sending Email Issue', 'wpforo') . ''; } ######################################################### //Other Issues ////////////////////////////////////////// $phrases = WPF()->db->get_var("SELECT COUNT(*) FROM `" . WPF()->tables->phrases . "`"); if( !$phrases ){ $issues['other']['empty_phrase_table']['level'] = 3; $issues['other']['empty_phrase_table']['message'] = __('wpForo phrases are missing!', 'wpforo'); $issues['other']['empty_phrase_table']['solution'] = __('Please download wpForo Phrases XML compressed file, unzip it, find english.xml file, navigate to Forums > Settings > General Tab and import it using [Add New] button of "XML Based Language" option.', 'wpforo') . ' [ ' . __('Download wpForo Phrases', 'wpforo') . ' ]'; } echo ''; if( !empty($issues) ){ foreach( $issues as $key => $issue ){ if(!empty($issue)){ echo ''; foreach( $issue as $data ){ echo ''; echo ''; echo ''; echo ''; } } } } else { echo ''; } echo '
' . strtoupper($key) . '
' . $data['message'] . '' . $data['solution'] . '

   ' . __('No issues found', 'wpforo') . '

'; } function wpforo_read_file_revers( $file ){ $result = array(); $numRows = 100; $handle = fopen($file, "r"); while (!feof($handle)) { array_push($result, fgets($handle, 4096)); if (count($result) > $numRows) array_shift($result); } $result = array_filter($result); $result = array_reverse($result); if( !empty($result) ){ echo '

' . __('Error Log File', 'wpforo') . ': ' . $file . '

'; echo ''; } else { echo '

' . __('No errors found', 'wpforo') . '

'; } }