Wednesday, 14 December 2016

ERR_CONTENT_DECODING_FAILED

If you are getting the error as ERR_CONTENT_DECODING_FAILED while accessing the domain then add the below extension in php.ini 
+++++++++++++++++
zlib.output_compression = On
+++++++++++++++++
Then restart the httpd. This should resolve the issue. 

Increase file upload size in wordpress multisite

In order to increase the file upload size in wordpress multi site please follow the below steps:
  1. Login to wordpress dashboard
  2. Click on Network Admin 
  3. Go to settings 
  4. Scroll down to Upload Settings at the bottom of the page. 
  5. Enter the desired value and click on Save. 


SEO tool issue in cPanel

If you are getting the below error in cPanel > SEO Tools
++++++++++++++++++ 
The system experienced a problem when it attempted to serve the requested page.
Login to server 
++++++++++++++++++ 
Then follow the below steps to resolve the issue : 

Edit the File:/usr/local/cpanel/base/3rdparty/attracta/index.live.pl
vi /usr/local/cpanel/base/3rdparty/attracta/index.live.pl
Add the below code after "use CGI" line
use Cpanel                                    ();

This should resolve the issue. 

Sunday, 11 December 2016

Post Date is showing as Undefined in custom templates of blogger



You are getting the error as "Undefined" for the "post date" in blogger template:



To resolve this error please follow the below steps:

Login to your blogger account
Go to Settings
Click on Language and formatting
Select the Timestamp Format as Sunday, December 11, 2016
Click on Save settings




This should resolve the error.

The domain already exists in the apache config file

Unable to add addon domain in cPanel getting the error as “The domain already exists in the apache config file”

Solution: Please remove the domain entries from below files manually from server.

/scripts/killdns domain.com

grep domain.com /etc/localdomains

grep domain.com /etc/userdomains

grep domain.com /etc/trueuserdomains

vi /var/cpanel/userdata/cpanelusername/main

grep domain.com /var/cpanel/userdata/cpanelusername/main.cache

grep domain.com /var/cpanel/users/cpanelusername

vi /var/cpanel/userdata/cPanelusername/main.cache

grep domain.com /etc/named.conf

vi /etc/localdomains //remove the domain entry

vi /etc/userdomains

grep domain.com /etc/trueuserowners

grep domain.com /var/cpanel/userdata/cPanelusername/main


Unable to login to joomla admin panel

After doing lot of research one of the solution which I found has worked for me and I would like to share the same with people in need. 

Check if upload_tmp_dir path is configured in php.ini. You can check by creating phpinfo.php file and add the below code in the phpinfo.php<?phpphpinfo();?>Then access the file as domain.com/phpinfo.phpIf it is not mentioned then open the configuration.php file of joomla, check which path is mentioned in "public $tmp_path" and add the same path in php.ini file. If php.ini file is not present then create one in /home/user/public_html/


Bot consuming high bandwidth and memory

Bad bots may be from google bot or any other bad bots. To reduce the same first you need to find which bot is affecting the bandwidth and memory. 


Find the log from below command: 
sudo grep "05/Nov/2015:0[1-2]" /usr/local/apache/domlogs/ulifeqxj/ulifephoto.com | grep -i "googlebot" | wc -l
sudo grep "05/Nov/2015:0[1-2]" /usr/local/apache/domlogs/ulifeqxj/ulifephoto.com | grep -i "bot" | wc -l


Once you found which bot is causing the issue, you can block it by adding rule in .htaccess. 

Htaccess rule for bad bots: 
http://pastebin.com/n0pShLsX

Follow the steps of below link to reduce google bots: 
https://support.google.com/webmasters/answer/48620?hl=en

Icon Images are missing in website

Problem :
While browsing the domain showing the webpage with icon missing. It is working fine with primary domain link. Ex: domain.com/domainfolder


Solution: 
Check the config.php file for any wrong update of home URL. Change it to domain name. This will fix the issue. 

Unable to install plugin in wordpress dashboard

While installing the plugin getting the below error:
+++++++++++++++++++
Could not create directory.
+++++++++++++++++++

Solution: Check if the plugins folder is present in /public_html/wp-content/


MP4 video is not playing - IIS/Plesk

You have to add the MIME Type to resolve this issue. You can add the MIME type in Virtual Directories > MIME Types or in web.config file. 
For Web.Config file you need to add below section in configuration.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <staticContent>
        <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
    </staticContent>
  </system.webServer>
</configuration>

Thursday, 8 December 2016

Checking log for hacked site

Hacked info will be present in the domlog. Get the path of the domlog for the domain from httpd.conf file.
sudo grep user /usr/local/apache/conf/httpd.conf

Grepping the hacked log :
sudo grep domain.com /usr/local/apache/domlogs/domain.com | grep 03/Jun/2016 | grep POST

Grepping the IPs:
sudo grep domain.com /usr/local/apache/domlogs/domain.com | grep 03/Jun/2016 | grep POST | awk '{print $1}' | cut -d: -f1 | sort | uniq -c | sort -n

You can check the location of the IP by going to http://www.ipligence.com/iplocation

You can block the IP by going to cPanel > IP deny manager

Subscription is not synced with the service plan in windows plesk panel


Please follow the below steps to sync the plan:

Login to Plesk

Click on subscriptions

Customize


Adjust the resources as per the available resource and save the plan.

Thursday, 8 September 2016

Enable Jail Shell using Command in cPanel

To setup jailshell access for a user from the command line interface, simply use the operating system's change shell command as root :
# chsh -s /usr/local/cpanel/bin/jailshell ${username}

Username = cPanel username 

Sunday, 26 October 2014

Show the inode usage for folders within your working directory

Following command will list complete inode usage from different folders with in the present working directory:


echo "Detailed Inode usage for: $(pwd)" ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; printf "$c\t\t- $d\n" ; done ; printf "Total: \t\t$(find $(pwd) | wc -l)\n"

Limiting number of HTTP Connections Per IP/Host

You can limit number of HTTP connections from single IP or Host using IPTABLES

The syntax is as follows :
/sbin/iptables -A INPUT -p tcp --syn --dport $port -m connlimit --connlimit-above N -j REJECT --reject-with tcp-reset

Example:
/sbin/iptables -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 20 -j REJECT --reject-with tcp-reset

Above command will limit 20 HTTP connections per IP

Sunday, 19 October 2014

Data error in File Manager

When you click on the File Manager in cPanel you get the following error :
Data error!
This error is caused by a corrupt mime type cache file. Rename the file and cPanel will generate a new one.


mv -v /home/<user>/.cpanel/datastore/SYSTEMMIME{,.bak}

Saturday, 18 October 2014

How to read the summary area fields describing CPU statistics from the top command log ?


When you run the "top" command in SSH , you get the results as following :

top - 19:46:04 up 18 days, 4 min, 1 user, load average: 0.16, 0.24, 0.27
Tasks: 138 total, 1 running, 137 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.1%us, 2.4%sy, 0.2%ni, 89.5%id, 2.7%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3887124k total, 3420008k used, 467116k free, 419972k buffers
Swap: 8392696k total, 269884k used, 8122812k free, 1395624k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 **** 20 0 19356 1052 836 S 0.0 0.0 0:06.04 init
2 **** 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 **** RT 0 0 0 0 S 0.0 0.0 0:10.97 migration/0
4 **** 20 0 0 0 0 S 0.0 0.0 0:50.46 ksoftirqd/0

In this cpu(s) line can be read as following :

{ Cpu(s): 5.1%us, 2.4%sy, 0.2%ni, 89.5%id, 2.7%wa, 0.0%hi, 0.0%si, 0.0%st }

us = user mode
sy = system mode
ni = low priority user mode (nice)
id = idle task
wa = I/O waiting
hi = servicing IRQs
si = servicing soft IRQs

st = steal (time given to other DomU instances)


Sunday, 27 July 2014

You do not have permission to create subdomains of the server's hostname

Getting the following error while creating the subdomain in the cPanel:
You do not have permission to create subdomains of the server's hostname

Solution:
  • Login to the "WHM" >> Go to "Server Configuration" >> Then go to "Tweak Settings"
  • Enable the Following option in the "Tweak Settings": 
       Allow users to park subdomains of the server’s hostname.

Tuesday, 11 March 2014

How to check the number of current MYSQL connections ?

Following are the different ways to check the MYSQL Connections to the database:
The below command will show the full stat about the mysql connections :
mysql> SHOW FULL PROCESSLIST\G

To get the number of connection attempts (successful or not) to the MySQL server :
mysql> show processlist;

Following command will show the number of open connections :
mysql> SHOW STATUS WHERE variable_name = 'Threads_connected';

To find current conection status you can use the following command :
#mysqladmin extended-status | grep -wi 'threads_connected\|threads_running' | awk '{ print $2,$4}' 
 
This will show you:
Threads_connected 12
Threads_running 1

Wednesday, 5 March 2014

Strict Standards: Only variables should be assigned

Strict Standards: Only variables should be assigned ... error on the website

Update the php version to php 5.3


ERR_CONTENT_DECODING_FAILED

If you are getting the error as ERR_CONTENT_DECODING_FAILED while accessing the domain then add the below extension in php.ini  ++++++++...