Showing posts with label Home. Show all posts
Showing posts with label Home. Show all posts

Wednesday 4 December 2013

The sub domain abc.domain.com is not working showing the >> server not found error


The sub domain abc.domain.com is not working showing the >> server not found error . 

Check if the sub domain is created by going to cPanel >> Subdomains, If the sub domain is created and it is pointed to the correct root document folder and try with following step to resolve the issue 

You will have to enable the rewritebase rule in the Apache. Since there is no RewriteBase enabled for the sub domain 

You can also add the following code in the .htacess directly. 

<IfModule mod_rewrite.c>

RewriteEngine On

# RewriteBase /folder_path/

RewriteBase /

Database Connection Error

Website showing Database Connection Error
If it is a wordpress website , it is a common issue

Check the following to resolve the issue :
Login to the cPanel >> go to File Manager >> Open the public_html directory >> look for the wp-config.php and open it using the code editor.
Save the database, database username , password.

Go to Mysql >> delete the database user (Note: Do not delete the database , delete only the database user ).
Then create the new database user again as specified in the
wp-config.php , then reassign the database user to the database.

Or, instaed of deleting the database user , you can click on the database user and reassign the privileges and save it. Some times it works.

If the above step did not work , check the database by clicking on the >> check DB under the Mysql .If you find the corrupted database tables , go to Mysql >> click on Repair DB. This will resolve the error.

If all of the above steps did not resolve the problem , contact the hosting provider to resolve the issue. If may also be the reason that server is down.

To enable the passive port range for ProFTPd


How do I enable the passive port range for ProFTPd?

To enable the passive port range for ProFTPd, perform the following via the command line as the root user:
  • Open /etc/proftpd.conf in a text editor, such as vi.
  • Add the following to the first section of the configuration file:
PassivePorts 49152 65534

  • Save the changes to the configuration file.
  • Run the command /usr/local/cpanel/scripts/restartsrv_ftpserver to restart the server.

Error: Connection timed out , Error: Failed to retrieve directory listing in the filezilla


Getting following error in the filezilla :

 PASV
Response: 227 Entering Passive Mode (119,18,57,237,6,29)
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing 


Solution:

Open passive port range in iptables and also in pure-ftpd configuration file.

To open the passive port range in pure-ftpd configuration file:
  • Open the /etc/pure-ftpd.conf configuration file in a text editor, such as vi.
  • Remove the number sign (#) from the beginning of the line which contains the PassivePortRange test.
  • Change that line to the following :
PassivePortRange 49152 65534
  • Save the changes to the configuration file.
  • Run the command /usr/local/cpanel/scripts/restartsrv_ftpserver to restart the server.


To open the passive port range in iptables :
To open passive mode ports in your firewall, issue the following commands at the command line as root:
iptables -I INPUT -p tcp --dport 49152:65534 -j ACCEPT
  • /etc/iptables-save

If the server is loading slowly check the below stats in the server


$uptime
12:03:11 up 1 day, 23:23, 2 users, load average: 44.67, 37.02, 30.92

$free -m
it will check for the memory (RAM) available.

$nice top -cd3
It will show details regarding the process consumption.

$mysqladmin proc stat
It will check the mysql process stats
This will show the stats regarding the slow queries.


$attackers 80
It will check for the highest http connection at the port 80

Note : Ip with more than 50 connections to the httpd should be blocked.

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 79 bytes)


Domain getting the following error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 79 bytes) in /home/username/public_html/libraries/joomla/database/database/mysqli.php on line 498


Solution: 

Step1 : Login to the root
Step 2: Create the info.php file and check the memory limit.
Step 3: If it is 64MB. Then go to php.ini. File and then change it to 256M according to the memory availability.

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings.


Website showing the following error :

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/username/public_html/../../flexycms_core/libs/smarty/plugins/prefilter.tpl_labels.php on line17


Add the following code at the end of the /home/quickpri/public_html/../../flexycms_core/libs/smarty/plugins/prefilter.tpl_labels.php file :

<?php
$timezone = "Asia/Calcutta";
if(function_exists('date_default_timezone_set')) date_default_timezone_set($timezone);
echo date('d-m-Y H:i:s');
?>

Enabling the Leverage Browser Caching



To Enable the Leverage browser caching

Add the below code in the .htaccess  of the root document directory of the domain:


## EXPIRES CACHING ##

ExpiresActive On

ExpiresByType image/jpg "access plus 1 year"

ExpiresByType image/jpeg "access plus 1 year"

ExpiresByType image/gif "access plus 1 year"

ExpiresByType image/png "access plus 1 year"

ExpiresByType text/css "access plus 1 month"

ExpiresByType application/pdf "access plus 1 month"

ExpiresByType text/x-javascript "access plus 1 month"

ExpiresByType application/x-shockwave-flash "access plus 1 month"

ExpiresByType image/x-icon "access plus 1 year"

ExpiresDefault "access plus 2 days"


## EXPIRES CACHING ##

Datalife Engine admin panel logs out automatically


The admin panel of the Datalife Engine Platform installed on the domain is logging out automatically , when we click on any button.


The problem was with the <session.auto_start> 

Go to  php.ini , open the php.ini and disable the  session auto_start by giving  
session.auto_start = 0

Tuesday 3 December 2013

Transferring WordPress Website from one server to another server


Backup the Files : Method 1 : Login to the cPanel >> go to Backup >> Take the backup of the entire website / only the Home directory.
Method 2 : Login to the cPanel >> go to File Manager >> go to Public_html >> Select all the File and Folder >> Click on Compress and make the zip file.
Then download it to the local System.

Backup the Database : Login to the cPanel >> go to Backup >> download the database backup file of the wordpress to the local system.


Login to the new server : Upload the zip file of the wordpress website to the following path :
Login to the cPanel >> go to File Manager >> go to Public_html >> upload the zip file and unzip the file.

Uploading the Database : Create the new database in the cPanel >> Databases >> MySQL.
Login to the Phpmyadmin >> Select the database >> Import >> Upload the database backup file.
After all the above step is completed. Go to go to File Manager >> go to Public_html >> edit the wp-config.php file and change the database connection details to the currently created new database details.

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  ++++++++...