Author Archives: LinuxTech

Disable WordPress plugins from PHPmyadmin

You can easily disable all WordPress plugins directly from your database. This is useful when you have problems with your WordPress installation, such as not being able to log in to the admin Dashboard, or having blank pages on the website.

If you don’t know which is the database used by your WordPress website, you can check the DB_NAME variable in the WordPress configuration file – wp-config.php. This file is usually located in the document root directory of your application and can be opened via the File Manager in cPanel.

To disable all plugins, go to phpMyAdmin in cPanel and select your WordPress database from the menu on the left.

Browse the table wp_options and find the option active_plugins. Click the pencil icon to edit the table. Its content will vary, depending on what plugins you have enabled. For example, if you have the Akismet and Hello Dolly plugins enabled, the code there will be:

To disable all plugins, simply delete the code and click the Go button to save the change.

Please note that this table may have a different prefix instead of wp_. You will see the correct prefix of the database once you access the phpMyAdmin tool and select the the WordPress database.

Disabling the plugins in this way will not delete them from your WordPress application. They will simply be deactivated. You can easily activate them from your WordPress admin area at any time.

softacalous Blank Screen cPanel/WHM

While trying to access softacalous from WHM > Plugins >

I was just getting White Screen

The tried disabling and enabling ioncube loader from WHM > Tweak Settings,

However the issue persisted

So I went ahead and reinstalled using below steps

the Softaculous folder here:

 

root@server1 [/usr/local/cpanel]# rm -rf /usr/local/cpanel/whostmgr/docroot/cgi/softaculous

root@server1 [/usr/local/cpanel]# wget -N http://files.softaculous.com/install.sh
–2017-07-25 12:03:36– http://files.softaculous.com/install.sh
Resolving files.softaculous.com… 192.198.80.3
Connecting to files.softaculous.com|192.198.80.3|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 4920 (4.8K) [application/x-sh]
Saving to: `install.sh’

100%[==================================================================================================================================================================>] 4,920 –.-K/s in 0s

2017-07-25 12:03:36 (279 MB/s) – `install.sh’ saved [4920/4920]

root@server1 [/usr/local/cpanel]# chmod 755 install.sh

 

———————————————-
Welcome to Softaculous Apps Installer
———————————————–

ln: creating symbolic link `/usr/local/cpanel/base/frontend/paper_lantern/softaculous/enduser’: File exists
ln: creating symbolic link `/usr/local/cpanel/base/frontend/x3/softaculous/enduser’: File exists
///////////////////////////////
// INSTALLING SOFTACULOUS :
// 1) CONFIGURING universal.php
// 2) FETCHED A LICENSE
// 3) UPDATING Categories
// 4) UPDATING Scripts List
// 5) UPDATING Installed Scripts List
// 6) SETTING A CRON JOB
// 7) DOWNLOADING SCRIPTS
///////////////////////////////

Syntax OK

Now softaculous is working fine

 

Cloudflare with Engintron

We had a issue where domain which is using cloudflare and server had engintron those domains were not working correctly

Engintron does support Cloudflare . There are few custom rules which needs to be setup from

WHM > Plugin > Emgintron  > Edit your custom_rules for Nginx

For domains which have dedicated IP below is the rule which needs to be added

if ($host ~ “oxyxxxxx.com”) {
set $PROXY_DOMAIN_OR_IP “173.1xx.xx5.xxx”;

}

Where you need to set right domain name and  right IP associated with domain

 

If using a shared IP address below is the rule that needs to be added in

Edit yourcustom_rules for Nginx and add below statement

set $PROXY_DOMAIN_OR_IP “XXX.XXX.XXX.XXX”;

Where you need to set shared IP in above example

 

 

 

 

mysqldump: Got error: 1017: Can’t find file: ‘wp_wfBadLeechers’ (errno: 2) when using LOCK TABLES

While making full backup of mysql using below command we got error

mysqldump: Got error: 1017: Can’t find file: ‘wp_wfBadLeechers’ (errno: 2) when using LOCK TABLES

# mysqldump –all-databases > /backup/all_databases.sql

The issue was due to some corrupt tables

Below is the fix used for  making a full dump of database ignoring error

mysqldump –skip-lock-tables -f –all-databases > /backup/all_databases.sql

Mysql backup was completed ignoring the corrupt tables.

 

 

 

 

 

Your server’s MySQL/MariaDB RPM target is set to “unmanaged”. cPanel

Was getting this error while trying to upgrade mysql in WHM/cPanel,

Your server’s MySQL/MariaDB RPM target is set to “unmanaged”. You cannot use the MySQL/MariaDB Upgrade feature while your server is in this state.

The issue was due to entry in file /var/cpanel/rpm.versions.d/local.versions set mysql to unmanaged

Went ahead and set it to managed and was able to upgrade mysql from WHM without any issues

 

 

 

One of the client was getting error while accessing Dell IPMi

Secure Connection Failed

The connection to 198.1xx.x.xxx was interrupted while the page was loading.

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.

The issue can be resolved using below steps

By executing below commands in server via cli

SSH to concerned server  and reset IPMI using

yum install OpenIPMI OpenIPMI-tools

modprobe ipmi_msghandler

modprobe ipmi_devintf

modprobe ipmi_si

ipmitool  mc reset cold

This fixed the issue.

 

error connection dropped by imap server. query capability

Was getting the error for squirrel mail on cpanel server

On Investigating could see issue was in Dovecot

Below is the fix I used

It’s possible that this can be rectified by increasing “Maximum Size of a Mail Process (MB)” under
Main >> Service Configuration >> Mailserver Configuration in WHM.

Once I did it the squirrel mail start working like a charm 🙂

 

 

 

ssh_exchange_identification: Connection closed by remote host

Was getting error while trying to SSH  to one of  the server on port 22

ssh_exchange_identification: Connection closed by remote host

The issue is due to too many excessive connections on port 22

You can fix it by below change  in SSH config

 MaxStartups variable in /etc/ssh/sshd_config to ,

port 2222 or any port you need to  and  
MaxStartups 100

Restart the SSH service ,

service sshd restart

W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY B493DBE84A1DB3CD

 

 

While trying to run an update  in Ubuntu 14.04 was getting an error

sudo apt-get update

 

Hit http://security.ubuntu.com trusty-security InRelease
Ign http://ppa.launchpad.net precise InRelease
Get:1 http://ppa.launchpad.net precise Release.gpg [836 B]
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://ppa.launchpad.net precise Release
Ign http://ppa.launchpad.net precise Release
Hit http://security.ubuntu.com trusty-security/restricted Sources
Ign http://ppa.launchpad.net precise/main amd64 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/universe Sources
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/multiverse Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://ppa.launchpad.net precise/main Translation-en
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://ppa.launchpad.net precise/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://ppa.launchpad.net precise/main i386 Packages
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Ign http://ppa.launchpad.net precise/main Translation-en_US
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Ign http://nl.archive.ubuntu.com trusty InRelease
Hit http://nl.archive.ubuntu.com trusty-updates InRelease
Hit http://nl.archive.ubuntu.com trusty Release.gpg
Hit http://nl.archive.ubuntu.com trusty-updates/main Sources
Hit http://nl.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://nl.archive.ubuntu.com trusty-updates/universe Sources
Hit http://nl.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/main i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/universe i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/multiverse i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nl.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://nl.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://nl.archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://nl.archive.ubuntu.com trusty Release
Hit http://nl.archive.ubuntu.com trusty/main Sources
Hit http://nl.archive.ubuntu.com trusty/restricted Sources
Hit http://nl.archive.ubuntu.com trusty/universe Sources
Hit http://nl.archive.ubuntu.com trusty/multiverse Sources
Hit http://nl.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/main i386 Packages
Hit http://nl.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://nl.archive.ubuntu.com trusty/universe i386 Packages
Hit http://nl.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://nl.archive.ubuntu.com trusty/main Translation-en
Hit http://nl.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://nl.archive.ubuntu.com trusty/restricted Translation-en
Hit http://nl.archive.ubuntu.com trusty/universe Translation-en
Ign http://nl.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nl.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://nl.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://nl.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 836 B in 19s (43 B/s)
Reading package lists… Done
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY B493DBE84A1DB3CD

 

The way to fix this error is by adding a key

Below is the step to add keys

sudo apt-key adv –keyserver ha.pool.sks-keyservers.net –recv-keys B493DBE84A1DB3CD

Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –homedir /tmp/tmp.z6Pp5ZKvEp –no-auto-check-trustdb –trust-model always –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver ha.pool.sks-keyservers.net –recv-keys B493DBE84A1DB3CD
gpg: requesting key 4A1DB3CD from hkp server ha.pool.sks-keyservers.net
gpg: key 4A1DB3CD was created 145258229 seconds in the future (time warp or clock problem)
gpg: key 4A1DB3CD was created 145258229 seconds in the future (time warp or clock problem)
gpg: key 4A1DB3CD was created 145258229 seconds in the future (time warp or clock problem)
gpg: key 4A1DB3CD: public key “Launchpad PPA for Roman Koblov” imported

 

Now apt-get update work fine without any errors

 

 

 

FAILED to open PAM security session (Module is unknown)

Cron Jobs in server were not getting executed automatically

On investigating I could see error like

Jun 16 14:05:01 ok1110 crond[5913]: (root) FAILED to open PAM security session (Module is unknown)
Jun 16 14:05:01 ok1110 crond[5912]: (root) FAILED to open PAM security session (Module is unknown)
Jun 16 14:06:01 ok1110 crond[6021]: (root) FAILED to open PAM security session (Module is unknown)

On deeper investigating I found the issue was in file

 /etc/pam.d/crond

I went ahead and copied file from working server and fixed this issue.

  • PAM configuration is the default:
$ cat /etc/pam.d/crond
#
# The PAM configuration file for the cron daemon
#
#
auth       sufficient pam_env.so
auth       required   pam_rootok.so
auth       include    system-auth
account    required   pam_access.so
account    include    system-auth
session    required   pam_loginuid.so
session    include    system-auth


If this file is modified the crond does not work for any users.