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

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


Replace old domain name or URL with new URL in WordPress

To replace the old domain name or the URL with the new URL in the wordpress blog site, refer the following steps :

Login to the cPanel >> go to phpMyAdmin >> Select the database you want to modify >> click on the SQL

Then type the following query to execute :
To update WordPress options with the new blog location, use the following SQL command:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

After that to fix URLs of the WordPress posts and pages stored in database wp_posts table as guid field use the following SQL command:
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');

Finally Use the following SQL commands to fix all internal links:

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

Tuesday 4 March 2014

Manually remove the cPanel account from the server

Inorder to manually remove the cPanel account from the server , please follow the below steps : 
(Note: For example consider the domain name as abc.com and username of the cPanel as abc)

  • rm /var/cpanel/users/abc
  • Remove the Virtual host entry for the domain abc.com from httpd.conf
    vi /etc/httpd/conf/httpd.conf remove the site VirtualHost entry
  • rm /var/named/[domain_name].db (If you used DNS Only cPanel, you may remove zone through WHM).
  • vi /etc/userdomains (remove only the abc.com: abc entry)
  • vi /etc/trueuserdomains (remove only the abc.com: abc entry)
  • vi /etc/trueuserowners ( remove only the abc: root entry)
  • vi /etc/named.conf ( remove the following entry:
                           zone "abc.c" {
                           type master;
                           file "/var/named/abc.com.db";
                             }; )
  • vi /etc/localdomains (remove only the abc.com: abc entry)
  • /etc/valiases (remove only the abc.com: abc entry)
Please login into the mysql and follow the steps
  • #mysql
  • mysql > use mysql;
  • mysql > drop user dbuser@localhost;
                     OR
          mysql> delete from mysql.user where user=dbuser;
  • vi /var/cpanel/databases/users.db ( remove only the entry of the domain )
  • rm /var/cpanel/databases/abc.cache
  • rm /var/cpanel/databases/abc.yaml
  • vi /etc/dbowners ( remove only the abc.com: abc entry)
This will manually remove the cPanel account from the server. 

Sunday 16 February 2014

Password Protect the Directory

To password protect the wp-admin page only and to avoid authentication pop-up window on the other website pages
Follow the following steps :
  • First password protect the directory using the "Password Protect Directories" in the cPanel.
  • After that add the following code in the htaccess of the domain.
                    <IfModule mod_rewrite.c>
                     RewriteEngine On
                     RewriteCond %{QUERY_STRING} !=""
                     RewriteCond %{QUERY_STRING} !^p=.*
                     RewriteCond %{QUERY_STRING} !^s=.*
                     RewriteCond %{REQUEST_URI} !^/wp-admin.*
                     RewriteRule ^(.*)$ /$1? [R=301,L]
                    </IfModule>

  • It will show the authnetication request only for the wp-admin page

Sunday 12 January 2014

Fatal error: Class 'PDO' not found

Drupal Website showing the following error
Fatal error: Class 'PDO' not found in /public_html/drupal/includes/database/
database.inc on line 184

If your server is using the php 5.2 , upgrade the php version to php 5.3 or higher

Or you will have to enable the PDO using the easyapache

Saturday 11 January 2014

How to open the port in the server

 If you want to open an incoming TCP port, type the following in the SSH as root user:
# iptables -I INPUT -p tcp --dport 12345 --syn -j ACCEPT
# service iptables save

 If you want to open an incoming UDP port, type the following in the SSH as root user:
# iptables -I INPUT -p udp --dport 12345 -j ACCEPT
# service iptables save

wp_localize_script was called incorrectly

Website showing the following error: 
Notice: wp_localize_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /public_html/wp-includes/functions.php on line 3049

Go to wp-config.php and make the following changes and check if it will work

define('WP_DEBUG', true); to define('WP_DEBUG', false);

It is not recommended to use WP_DEBUG or the other debug tools on live sites; they are meant for local testing and staging installs.

Friday 10 January 2014

Can't locate Error.pm in @INC error

Can't locate Error.pm in @INC error in the Quickinstall

In the Quickinstall it shows the following error : 
A fatal error or timeout occurred while processing this directive
 A box should expand giving an error message followed by a traceback. If the error message gives something as following 
Can't locate Error.pm in @INC error ...

Then try executing the following command in the SSH 
# cpan Error.pm

Saturday 21 December 2013

Cannot find the robot.txt anywhere in my file manager but the domain.com/robots.txt is working

In the wordpress website the robots.txt is automatically getting generated by the following script : function do_robots() {
header( 'Content-Type: text/plain; charset=utf-8' );

do_action( 'do_robotstxt' );

if ( '0' == get_option( 'blog_public' ) ) {
echo "User-agent: *\n";
echo "Disallow: /\n";
} else {
echo "User-agent: *\n";
echo "Disallow:\n";
}
}
in the file /functions.php which is under the /wp-includes/ folder. So you can modify the code to change the robots.txt settings.

If you do not wish to show the robots.txt file you can redirect it to the 404 error page using the .htaccess

Redirect 301 /robots.txt http://www.yoursite.com/404

Thursday 19 December 2013

Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error

Below error occurred while trying to connect to the WordPress.com under jetpack plugin in wp-admin panel:
Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error Details: The Jetpack server was unable to communicate with your site [HTTP 503]. Ask your web host if they allow connections from WordPress.com. If you need further assistance, contact Jetpack Support: http://jetpack.me/support/

Try disabling the maintenance plugins if you have enabled and try to connect it.
The maintenance plugins like : WP Maintenance Mode and ThemeFuse Maintenance Mode
Or try disabling all the plugins that you have recently added and try if it is getting connected.

Or try deactivating the Jetpack plugin and reactivate it again and try connecting it , this worked for me .

Also check if your domain name server is updated , or updated to the right hosting account. Also check if the A record is pointing correctly.

If this is not resolved the issue you will have to contact either the http://jetpack.me/support/ or the hosting provider to check if the port is blocked or the website is blocked.

Sunday 15 December 2013

MySQL database not appearing in cPanel but exists in the server

If a database exists but is not displayed in cPanel it likely is not being tracked by the db mapping system.

Check to see if database is listed in user.yaml by running the following command:
#cat /var/cpanel/databases/user.yaml 

If the result is as follows : 
No databases tracked:
root@server [~]# cat /var/cpanel/databases/tacct.yaml
---
MYSQL:
dbs: {}
dbusers: {}

Follow the below steps : 

To map missing databases and users run the following:

#/usr/local/cpanel/bin/dbmaptool cpanelusername --type mysql --databasename

#/usr/local/cpanel/bin/dbmaptool cpanelusername --type mysql –databaseuser

#/usr/local/cpanel/bin/dbmaptool cpanelusername --type mysql –databasename cpanelusername_databaseuser

After the above steps are executed check with the following command if the database has been mapped in the db mapping system.
#cat /var/cpanel/databases/abc.yaml
The result should be as follows : 
---
MYSQL:
dbs:
tacct_testdb: IP Address
dbusers: {}
owner: tacct
server: IP Address

Unable to create directory uploads/2013/12. Is its parent directory writable by the server?

Unable to create directory uploads/2013/12. Is its parent directory writable by the server ? Error while uploading the image under media in the WordPress admin panel.

Login to the WordPress admin panel

Go to Settings >> Media

Change the path to wp-content/uploads

The issue will be resolved.

If it did not resolve the issue , you can try changing the folder permission for the folders wp-content and wp-content/uploads to 777 in the cPanel .

Saturday 14 December 2013

How to check if the cron job is executed or not ?

Cron-related messages, including success and failure, are logged to /var/log/cron .

You can also take a look at /var/log/messages and watch the email account listed in /root/.forward as that is where cron error reports would usually show up.

The cron job path for the domain : /var/spool/cron/username

Tuesday 10 December 2013

Removing the mysqladmin root password for the MySQL


First stop the MySQL service by running the following command in the SSH
/etc/init.d/mysql stop

After that run the following command
mysqld_safe --skip-grant-tables &

After this the MySQL admin password will be removed and you can
directly access the MySQL with out the password.

Wednesday 4 December 2013

Setting the magic_quotes_gpc=off to install the Joomla


Login to the server of the account as a root.

Set the magic_quotes_gpc=off in the file /usr/local/lib/php.ini

For the shared server :
You can try creating the php.ini in the root document folder in the File Manager >> Public_html and add the code 
magic_quotes_gpc=off 

Warning: mkdir() [function.mkdir]: Permission denied in DrupalLocalStreamWrapper->mkdir()


Drupal is giving the following error while uploading the themes:

Warning: mkdir() [function.mkdir]: Permission denied in DrupalLocalStreamWrapper->mkdir() (line 639 of /home/username/public_html/includes/stream_wrappers.inc). 
รข€¢bootstrap-7.x-2.1 (1).zip does not contain any .info files. 

Try With the Following Solution :
  • Change the file permission for the /sites/default/ to 777
  • Create the folder called /temps/ in the /home/username/public_html provide the file permission for the /temps/ as 777
  • Login to the drupal admin panel >>Go to Configuration >> Media >> File System. Change the Temporary directory path to the following :
    home/username/public_html/temps
  • Then save the settings. 

     

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