FormMail script

Follow the links below:

http://scriptarchive.com/readme/formmail.html

http://scriptarchive.com/download.cgi?s=formmail

You need to upload the formmail script to cgi-bin/ folder and set permissions for formmail.pl to 755. Then change one line in the .pl script:

from: @referers = ('scriptarchive.com','YOUR_IP'); to: @referers = ('yourdomain.com','www.yourdomain.com');

You will need to add the following lines to your contact form:

<input type=hidden name="recipient" value="[email protected]">
Read the rest

How to show a real multisite WordPress super admin users via MySQL command line

For multisite WordPress version run the following commands:

mysql
use database_name;
SELECT * FROM wp_sitemeta where meta_key='site_admins';

This will also allow you to know which users can access plugins for management… Read the rest

How to update server’s time

I did it on OpenVZ server and it works like a charm

rm -fv /etc/localtime
ln -s /usr/share/zoneinfo/GMT /etc/localtime
or
ln -s /usr/share/zoneinfo/CST6CDT /etc/localtime

Note the sym link may not work, so just copy file physically

Set date and sync it on hardware

date 081209312016
hwclock --systohc

The syntax is `date MMDDhhmmYYYY`.… Read the rest

How to configure firewall on CentOS cPanel server to use IPSET

This will improve your firewall's  performance

Install IPSET using:

yum install ipset ipset-devel -y

Update configuration file /etc/csf/csf.conf. Value for LF_IPSET needs to be set to 1 to get it enabled

Once its done go ahead and increase DENY_IP_LIMIT and DENY_TEMP_IP_LIMIT values for example up to 3000

You may use the following sed command for that

sed -i -e 's/LF_IPSET = "0"/LF_IPSET = "1"/g' /etc/csf/csf.conf
Read the rest

How to install CSF firewall on CentOS cPanel server

Download and install using:

wget https://download.configserver.com/csf.tgz
tar xfz csf.tgz
cd csf
sh install.sh

Update the following file with a trusted IP addresses

/etc/csf/csf.allow

Go ahead and disable testing mode

sed -i -e 's/TESTING = "1"/TESTING = "0"/g' /etc/csf/csf.conf

Once done, restart your firewall

csf -r

To add your IP address to a permanent allow list use:

csf -a 11.22.33.44

To block an IP address:

csf -d 11.22.33.44

Use following to see the lfd logs

tail -f /var/log/lfd.log
Read the rest

Xubuntu fixing Skype video upside down

To check how its going close your Skype session and run the following from the inside your command line:

bash -c 'LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype'

Its working…

Go ahead and update your Skype luncher on you panel with this line to start fixed Skype

You may create executable file to run Skype session

#!/bin/bashRead the rest

CloudLinux, lveinfo issue

Problem when lveinfo reflects an empty or error results

[email protected][~]# lveinfo -u username 

Error while reading lve_version from database

[email protected] [~]# lveinfo -u username 

+—-+–+—-+—-+—-+—+—+—+—+

|From|To|aCPU|mCPU|lCPU|aEP|mEP|lEP|EPf|

+—-+–+—-+—-+—-+—+—+—+—+

To fix this out:

/etc/init.d/lvestats stop 

mv /var/lve/lveinfo.db /var/lve/lveinfo.db_old 

/etc/init.d/lvestats start 

Stats should start showing in ~1 minute

[email protected] [~]# lveinfo -u username 

+———–+———–+—-+—-+—-+—+—+—-+—+—+—+—–+—–+—–+—–+—–+——+—+—–+—–+—–+—–+—–+
| From | To |aCPU|mCPU|lCPU|aIO|mIO|lIO |aEP|mEP|lEP|aVMem|mVMem|lVMem|aPMem|mPMem|lPMem |EPf|VMemF|PMemF|aIOPS|mIOPS|lIOPS|
+———–+———–+—-+—-+—-+—+—+—-+—+—+—+—–+—–+—–+—–+—–+——+—+—–+—–+—–+—–+—–+
|07-28 12:35|07-28 12:36| 0 | 1 | 9 | 0 | 3 |3072| 0 | 0 | 20| 0 | 0 | 1.0G| 6.3M| 6.5M|256.0M| 0 | 0 | 0 | 0 | 0 | 1024|
+———–+———–+—-+—-+—-+—+—+—-+—+—+—+—–+—–+—–+—–+—–+——+—+—–+—–+—–+—–+—–+

Done!… Read the rest

Update curl on Centos to the latest version

Find the latest version under the following link:

http://curl.haxx.se/download/?C=M;O=D

For instance curl-7.46.0 version

Download and install it

cd /usr/local/src/
curl http://curl.haxx.se/download/curl-7.46.0.tar.gz | tar xvz
cd curl-7.46.0/
./configure && make && make install
curl -V
Read the rest

How to recreate WordPress table

The error's output like the following:

Error    : Table 'XXXX_wrdp1.wp_comments' doesn't exist

mysql DATABASE_NAME;
DROP TABLE IF EXISTS wp_comments;
CREATE TABLE wp_comments (
comment_ID bigint(20) unsigned NOT NULL auto_increment,
comment_post_ID int(11) NOT NULL default '0',
comment_author tinytext NOT NULL,
comment_author_email varchar(100) NOT NULL default '',
comment_author_url varchar(200) NOT NULL default '',
comment_author_IP varchar(100) NOT NULL default '',
comment_date datetime NOT NULL default '0000-00-00 00:00:00',
comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00',
comment_content text NOT NULL,
comment_karma int(11) NOT NULL default '0',
comment_approved varchar(20) NOT NULL default '1',
comment_agent varchar(255) NOT NULL default '',
comment_type varchar(20) NOT NULL default '',
comment_parent bigint(20) NOT NULL default '0',
user_id bigint(20) NOT NULL default '0',
PRIMARY KEY (comment_ID),
KEY comment_approved (comment_approved),
KEY comment_post_ID (comment_post_ID),
KEY comment_approved_date_gmt (comment_approved,comment_date_gmt),
KEY comment_date_gmt (comment_date_gmt)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

You may know about WordPress table's structure here:

http://codex.wordpress.org/Database_Description#Table:_wp_comments… Read the rest