How to fix innodb_table_stats and innodb_index_stats has length mismatch

To fix annoying warnings like:

[Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade

Just go ahead and run mysql_upgrade.… Read the rest

Centos 7 systemd increase MySQL open_files_limit

MySQL Warning like: Could not increase number of max_open_files to more than 65536

cat /etc/my.cnf |grep open_files_limit
open_files_limit=73461

But MySQL still shows 65536
MariaDB [(none)]>  SHOW VARIABLES LIKE 'open_files_limit';
+------------------+--------+
| Variable_name    | Value  |
+------------------+--------+
| open_files_limit | 65536 |
+------------------+--------+
1 row in set (0.00 sec)

Try to update next files:

/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.confRead the rest

How to tune/calculate table_open_cache, open_files_limit, table_definition_cache, table_open_cache_instances

Check current value of open_tables and opened_tables

Run:

show global status  like 'open%';

Output:

MariaDB [(none)]> show global status  like 'open%';
+--------------------------+----------+
| Variable_name            | Value    |
+--------------------------+----------+
| Open_files               | 2258     |
| Open_streams             | 0        |
| Open_table_definitions   | 1888     |
| Open_tables              | 2000     |
| Opened_files             | 10504934 |
| Opened_plugin_libraries  | 28       |
| Opened_table_definitions | 488898   |
| Opened_tables            | 542079   |
| Opened_views             | 18497    |
+--------------------------+----------+

Find out Table cache hit rate

Run:

show global variables like 'table_open_cache';

Output:

MariaDB [(none)]> show global variables like 'table_open_cache';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| table_open_cache | 2000  |
+------------------+-------+
1 row in set (0.00 sec)

Calculating:

Table cache hit rate = table_open_cache*100/Opened_tables

2000×100÷542079=0.37%

In general it should be more than 50%

Find out total tables of your databases

Run:

SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
Read the rest

Joomla 3.8.11 default index.php file

Short command:

curl -s https://alltime.pp.ua/downloads/j3-8-11index.txt > index.php

Copy/paste:

<?php
/**
* @package    Joomla.Site
*
* @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license    GNU General Public License version 2 or later; see LICENSE.txt
*/

/**
* Define the application's minimum supported PHP version as a constant so it can be referenced within the application.
Read the rest

SpamAssassin custom rules

Source:

http://spamassassin.apache.org/doc.html

http://spamassassin.apache.org/old/tests_3_0_x.html

You need to update your user_prefs with the custom rules.

Short command:

 

cd /home/USERNAME/.spamassassin

cp -rp user_prefs{,_bk}

curl -s https://alltime.pp.ua/downloads/user_prefs.txt > user_prefs

 

Otherwise copy/paste the following into your user_prefs file

#####################

add_header all Status _SCORE_

whitelist_from *@greengeeks.com
Read the rest

How to recover Joomla 3+

Ensure you have backed up your current website's version files/database

Tested on Joomla 3+ and can be helpful if system files are broken:

Find needed version and download it from https://downloads.joomla.org/latest
 

cd ~/public_html/
mkdir temp; cd $_
wget https://downloads.joomla.org/cms/joomla3/3-8-11/Joomla_3-8-11-Stable-Full_Package.zip
cd -
rsync -avz temp/* ./
Read the rest

WordPress default index.php file

Short command:

curl -s https://alltime.pp.ua/downloads/wpindex.txt > index.php

##

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
Read the rest

How to enable cPanel CalDAV

Enable DAV daemon over WHM –> Service Manager

Remove if needed from disable features WHM –> Feature Manager

Allowing ports 2077, 2078, 2079, and 2080 in your firewall

If CSF update csf.conf TCP_IN with the ports range 2077:2080:

/etc/csf/csf.conf

TCP_IN = "20,21,22,25,26,80,110,143,443,465,587,993,995,2082,2083,2086,2087,2095,2096,2077:2080"

Restart csf

csf -r

cPanel's documentation:

https://documentation.cpanel.net/display/CKB/How+to+Set+Up+Calendars+and+ContactsRead the rest

Drupal 7 all links are showing home page only

Most likely the problem is related to the Clean URLs

Way to disable it using command line:

Run the drush commands:

drush vset clean_url 0 --yes

Run the mysql commands:

UPDATE variable SET value = 's:1:"0";' WHERE name = 'clean_url';
DELETE FROM cache;

Alternatively, you can modify the appropriate settings.phpRead the rest