<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Servers cPanel webhosting blog</title>
	<atom:link href="http://www.theperfectarts.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theperfectarts.com</link>
	<description>Basics cPanel tutorials / issue,mysql,php errors etc</description>
	<lastBuildDate>Sat, 04 Feb 2012 17:18:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>phpMyAdmin showing the foreach() error</title>
		<link>http://www.theperfectarts.com/2012/02/phpmyadmin-showing-the-foreach-error/</link>
		<comments>http://www.theperfectarts.com/2012/02/phpmyadmin-showing-the-foreach-error/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 17:18:43 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[cPanel + cPanel scripts]]></category>
		<category><![CDATA[Mysql + phpmyadmin]]></category>
		<category><![CDATA[output_buffering error]]></category>
		<category><![CDATA[phpmyadmin session error message]]></category>
		<category><![CDATA[phpMyAdmin showing the foreach() error]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1900</guid>
		<description><![CDATA[After upgrading the cPanel version, the following error is occur when we are browsing the phpMyAdmin. Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php on line 52 Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php on line 155 Warning: Cannot modify header information &#8211; headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php:52) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.lib.php on [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* Big images */ google_ad_slot = "0185136902"; google_ad_width = 336; google_ad_height = 280;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* Big images */ google_ad_slot = "0185136902"; google_ad_width = 336; google_ad_height = 280;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
After upgrading the cPanel version, the following error is occur when we are browsing the phpMyAdmin.</p>
<p><strong>Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php on line 52</strong></p>
<p>Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php on line 155</p>
<p>Warning: Cannot modify header information &#8211; headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php:52) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.lib.php on line 1154<strong></strong></p>
<p>To resolve the above error, we can simply enable the output_buffering in the following file.</p>
<p><strong>/usr/local/cpanel/3rdparty/lib/php.ini</strong></p>
<p>Change the <strong>&#8220;output_buffering&#8221;</strong> from <strong>Off to On</strong>.</p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/02/phpmyadmin-showing-the-foreach-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Admin user blocked in Plesk control panel.</title>
		<link>http://www.theperfectarts.com/2012/01/admin-user-blocked-in-plesk-control-panel/</link>
		<comments>http://www.theperfectarts.com/2012/01/admin-user-blocked-in-plesk-control-panel/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 07:22:14 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Admin user blocked]]></category>
		<category><![CDATA[admin user not able to login plesk]]></category>
		<category><![CDATA[incorrect login blocked admin user in plesk]]></category>
		<category><![CDATA[plesk panel issue]]></category>
		<category><![CDATA[plesk panel locked]]></category>
		<category><![CDATA[plesk panel locked for admin use]]></category>
		<category><![CDATA[resolve admin user in plesk panel]]></category>
		<category><![CDATA[resolve plesk panel]]></category>
		<category><![CDATA[unlock plesk panel]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1886</guid>
		<description><![CDATA[After trying to login in to the Plesk panel with the incorrect password as per security policy admin account locked for the 30 minutes at that we have to wait for 30 minutes to get admin account unlocked or we can unlocked the admin user from shell. Login in to server as root user and [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-1685490665026631";
/* Big images */
google_ad_slot = "0185136902";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1685490665026631";
/* Big images */
google_ad_slot = "0185136902";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
After trying to login in to the Plesk panel with the incorrect password as per security policy admin account locked for the 30 minutes at that we have to wait for 30 minutes to get admin account unlocked or we can unlocked the admin user from shell.</p>
<p>Login in to server as root user and follow the following steps.<br />
<strong>linux@server[~]#cat /etc/psa/.psa.shadow</strong></p>
<p><strong>linux@server[~]#mysql -u admin -p adminpassword</strong></p>
<p>Use the password received in the first command.<br />
<strong>mysql&gt; use psa;<br />
delete from lockout where login = ‘admin’;</strong></p>
<p>Now try to browse the Plesk panel with the admin user and correct password.</p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/01/admin-user-blocked-in-plesk-control-panel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server wide permission issue after enabling suphp</title>
		<link>http://www.theperfectarts.com/2012/01/server-wide-permission-issue-after-enabling-suphp/</link>
		<comments>http://www.theperfectarts.com/2012/01/server-wide-permission-issue-after-enabling-suphp/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 09:24:01 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Basic Linux]]></category>
		<category><![CDATA[cPanel + cPanel scripts]]></category>
		<category><![CDATA[Dedicated Server Issue]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Linux Permissions]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[resolve 500 Internal Server Error]]></category>
		<category><![CDATA[scrip to correct ownership]]></category>
		<category><![CDATA[script to correct permission]]></category>
		<category><![CDATA[script to correct server wide permission]]></category>
		<category><![CDATA[script to correct user ownership]]></category>
		<category><![CDATA[script to resolve 500 internal server error]]></category>
		<category><![CDATA[script to resolve suphp issue]]></category>
		<category><![CDATA[Server wide .htacces php value issue]]></category>
		<category><![CDATA[Server wide ownership issue]]></category>
		<category><![CDATA[Server wide permission issue]]></category>
		<category><![CDATA[Server wide solution script]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1877</guid>
		<description><![CDATA[After enabling the suphp on the server,many time 500 Internal Server Error occur due to the incorrect permission,ownership and incorrect php module defined in the .htaccess file and we can&#8217;t make the changes manually therefore we can use the following script to make the all the changes server. Login into the server as a root user [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-1685490665026631";
/* Big images */
google_ad_slot = "0185136902";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1685490665026631";
/* Big images */
google_ad_slot = "0185136902";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript">// <![CDATA[
            var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   </p>
<p>(function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = </p>
<p>('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = </p>
<p>document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script><br />
After enabling the suphp on the server,many time 500 Internal Server Error occur due to the incorrect permission,ownership and incorrect php module defined in the .htaccess file and we can&#8217;t make the changes manually therefore we can use the following script to make the all the changes server.</p>
<p>Login into the server as a root user and follow the followings steps.</p>
<blockquote><p>
<strong>linux7802@server[~]#cat /root/suphppermission.sh</strong></p>
<p><strong>#!/bin/bash</strong></p>
<p><strong># Reset the directory permissions.</strong><br />
<strong>chmod 755 /opt/suphp</strong><br />
<strong>find /opt/suphp -type d -exec chmod 755 {} \;</strong></p>
<p><strong># Reset permission,ownership for cPanel user</strong><br />
<strong>for user in `/bin/ls /var/cpanel/users`; do</strong></p>
<p><strong>chown -R ${user}:${user} /home/${user}/public_html</strong><br />
<strong> chmod 755 /home/${user}/public_html</strong><br />
<strong> find /home/${user}/public_html -type f -exec chmod 644 {} \;</strong><br />
<strong> find /home/${user}/public_html -type d -exec chmod 755 {} \;</strong></p>
<p><strong># Remove <strong>php_values in the .htaccess file</strong>.</strong><br />
<strong> find /home/${user}/public_html -name &#8216;.htaccess&#8217; -exec sed -ie &#8216;s/php_value/#php_value/&#8217; {} \;</strong><br />
<strong> find /home/${user}/public_html -name &#8216;.htaccess&#8217; -exec sed -ie &#8216;s/php_flag/#php_flag/&#8217; {} \;</strong><br />
<strong>done</strong></p></blockquote>
<p>If you have any issue to copy the above content the download the script from following URL<br />
<a title="scr" href="http://theperfectarts.com/permission.txt" target="_blank">scr</a></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/01/server-wide-permission-issue-after-enabling-suphp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rebuild qmail service on Plesk server</title>
		<link>http://www.theperfectarts.com/2012/01/rebuild-qmail-service-on-plesk-server/</link>
		<comments>http://www.theperfectarts.com/2012/01/rebuild-qmail-service-on-plesk-server/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 23:59:49 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[plesk qmail isue]]></category>
		<category><![CDATA[qmail corrupt]]></category>
		<category><![CDATA[qmail resolve]]></category>
		<category><![CDATA[rebuild qmail on plesk server]]></category>
		<category><![CDATA[Rebuild qmail service]]></category>
		<category><![CDATA[reconfigure the qmail]]></category>
		<category><![CDATA[resolve qmail corrupt issue]]></category>
		<category><![CDATA[solution for qmail]]></category>
		<category><![CDATA[solve qmail issue]]></category>
		<category><![CDATA[sort out qmail issue]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1873</guid>
		<description><![CDATA[As qmail service is corrupt on the server then we can reconfigure it by using the following steps but make sure that you have logged in as root user. Stop the running mail services. /etc/init.d/qmail stop /etc/init.d/xinetd stop Now take the backup for the existing qmail to ignore any data loss issue. mv /var/qmail/queue /var/qmail/queue_old [...]]]></description>
			<content:encoded><![CDATA[<p>As qmail service is corrupt on the server then we can reconfigure it by using the following steps but make sure that you have logged in as root user.</p>
<p>Stop the running mail services.<br />
<script type="text/javascript">// <![CDATA[
      google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
           var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script><br />
<strong>/etc/init.d/qmail stop<br />
/etc/init.d/xinetd stop</strong></p>
<p>Now take the backup for the existing qmail to ignore any data loss issue.</p>
<p><strong>mv /var/qmail/queue /var/qmail/queue_old</strong></p>
<p>Now check which qmail rpm we are using on the server<br />
<strong><br />
rpm -q psa-qmail</strong></p>
<p>As soon as you confirm the installed qmail rpm, select the rpm from the following URL as per the Plesk version and server OS.<br />
<script type="text/javascript">// <![CDATA[
      google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
           var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script></p>
<p>http://autoinstall.pp.parallels.com/</p>
<p>For example we are using the Plesk 9.0.1 and cetnOS 5.6 with 32BIT</p>
<p><strong>rpm -Uvh &#8211;force http://autoinstall.pp.parallels.com/PSA_9.0.1/dist-rpm-CentOS-5-i386/opt/maildrivers/psa-qmail-1.03-cos5.build90090127.18.i586.rpm</strong></p>
<p>Now restart the mails services</p>
<p><strong>/etc/init.d/qmail start<br />
/etc/init.d/xinetd start</strong></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/01/rebuild-qmail-service-on-plesk-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>cPanel log to check when hosting created and deleted</title>
		<link>http://www.theperfectarts.com/2012/01/cpanel-log-to-check-when-hosting-created-and-deleted/</link>
		<comments>http://www.theperfectarts.com/2012/01/cpanel-log-to-check-when-hosting-created-and-deleted/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 13:28:55 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Basic Linux]]></category>
		<category><![CDATA[cPanel + cPanel scripts]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[accounting.log]]></category>
		<category><![CDATA[accounting.log for security]]></category>
		<category><![CDATA[check hosting account loghs]]></category>
		<category><![CDATA[cpanel accounting.log]]></category>
		<category><![CDATA[delete logs]]></category>
		<category><![CDATA[modify logs]]></category>
		<category><![CDATA[remove logs]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1867</guid>
		<description><![CDATA[In the recent days, we all are facing the hacking issue at that time, we always see problem like account termination from the serve at that time, we can use the following log file to investigate the issue as its providing when hosting account was created, owner changed or account deleted from the server. For [...]]]></description>
			<content:encoded><![CDATA[<p>In the recent days, we all are facing the hacking issue at that time, we always see problem like account termination from the serve at that time, we can use the following log file to investigate the issue as its providing when hosting account was created, owner changed or account deleted from the server.<script type="text/javascript">// <![CDATA[
     google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
          var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script>For example we are checking logs for the domain test123.com and as per the following logs the hosting account for domain test123.com is created by using the root owner on dated <strong>Wed Jan 11 08:19:40 2012 </strong>and onwership is under root</p>
<p><strong>root@linux7802 [~]# cat /var/cpanel/accounting.log | grep test123.com</strong><br />
<strong>Wed Jan 11 08:19:40 2012:CREATE:root:root:test123.com:115.124.103.126:admin111</strong><br />
<script type="text/javascript">// <![CDATA[
     google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
          var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script>Now we have changed the ownership for the domain test123.com hosting account to linux780 reseller ownership therefore check the following logs</p>
<p><strong>root@linux7802 [~]# cat /var/cpanel/accounting.log | grep test123.com </strong><br />
<strong>Wed Jan 11 08:22:51 2012:CHANGEOWNER:root:root:test123.com:admin111:root:linux780</strong><br />
<!-- Place this tag where you want the +1 button to render --><br />
<g:plusone annotation="inline"></g:plusone></p>
<p><!-- Place this render call where appropriate --><br />
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>Now we have terminated the hosting account for the domain test123.com by using the root user and its also recorded in the accounting.log</p>
<p><strong>root@linux7802 [~]# cat /var/cpanel/accounting.log | grep test123.com</strong><br />
<strong>Wed Jan 11 08:25:14 2012:REMOVE:root:root:test123.com:admin111</strong></p>
<p>So we can similarly check the logs for all the domains when they have created/modified or removed from the server and its always to better to maintain the accounting.log for future reference.</p>
<p><strong><br />
</strong></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/01/cpanel-log-to-check-when-hosting-created-and-deleted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vzmigrate command for VPS migration</title>
		<link>http://www.theperfectarts.com/2012/01/vzmigrate-command-for-vps-migration/</link>
		<comments>http://www.theperfectarts.com/2012/01/vzmigrate-command-for-vps-migration/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 14:40:56 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[command to migrate VPS]]></category>
		<category><![CDATA[migrate running VPS]]></category>
		<category><![CDATA[migrate VPS from one node to another]]></category>
		<category><![CDATA[transfer all the VPS from one node to another node]]></category>
		<category><![CDATA[transfer VPS from one node to another node]]></category>
		<category><![CDATA[vzmigrate command]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1857</guid>
		<description><![CDATA[The vzmigrate command is used to migrate the one VPS from node to the new or another node. For example, we want to migrate the VPS which is currently having id 110 on new node and its ip is 192.168.0.1 server@linux[~]# vzmigrate 192.168.0.1  110 or server@linux[~]# vzmigrate -r no 192.168.0.1 110 Some time node on which,we are trying [...]]]></description>
			<content:encoded><![CDATA[<p>The vzmigrate command is used to migrate the one VPS from node to the new or another node.<script type="text/javascript">// <![CDATA[
     google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
          var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script><br />
For example, we want to migrate the VPS which is currently having id 110 on new node and its ip is <strong>192.168.0.1</strong></p>
<p><strong>server@linux[~]# vzmigrate 192.168.0.1  110</strong></p>
<p><strong>or</strong></p>
<p><strong>server@linux[~]# vzmigrate -r no 192.168.0.1 110</strong></p>
<p>Some time node on which,we are trying to migrate the VPS we are receiving the following error message</p>
<p><strong>110 already exists on the destination node.</strong></p>
<p>To resolve the above error we can assign new id to the VPS</p>
<p><strong>server@linux[~]#vzmigrate -r no 192.168.0.1 110:120</strong><br />
<script type="text/javascript">// <![CDATA[
     google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
          var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script><br />
The new id on the new node will be 120 for VPS</p>
<p>We can also do online migration of VPS from one to another node.</p>
<pre><strong>server@linux[~]#vzmigrate --online 192.168.0.1 110</strong></pre>
<pre><strong>or</strong></pre>
<pre><strong>server@linux[~]#vzmigrate --online 192.168.1.130 110:120</strong></pre>
<p>If you want to migrate all the running VPS from one node to another node then refer to following command</p>
<pre><strong>for CT in $(vzlist -H -o veid);</strong></pre>
<pre><strong>do vzmigrate --remove-area no --keep-dst $1 $CT; done</strong></pre>
<pre></pre>
<p>&nbsp;</p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/01/vzmigrate-command-for-vps-migration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>cPanel file manager giving 404 not found error</title>
		<link>http://www.theperfectarts.com/2012/01/cpanel-file-manager-giving-404-not-found-error/</link>
		<comments>http://www.theperfectarts.com/2012/01/cpanel-file-manager-giving-404-not-found-error/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 16:28:00 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[cPanel + cPanel scripts]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[404 error message in file manager]]></category>
		<category><![CDATA[cpanel 404 error message]]></category>
		<category><![CDATA[cPanel file manager giving 404]]></category>
		<category><![CDATA[resolve 404 error message]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1852</guid>
		<description><![CDATA[While browsing the file manager from the cPanel the 404 not found error message is occur. Not Found The server was not able to find the document (./frontend/x3/index.html) you requested. Please check the url and try again. You might also want to report this error to your web hosting provider. whostmgrd/11.25 As per above error [...]]]></description>
			<content:encoded><![CDATA[<p>While browsing the file manager from the cPanel the 404 not found error message is occur.<br />
<script type="text/javascript">// <![CDATA[
    google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
         var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script></p>
<blockquote><p><strong>Not Found</strong></p>
<p>The server was not able to find the document (./frontend/x3/index.html) you requested.<br />
Please check the url and try again. You might also want to report this<br />
error to your web hosting provider.</p>
<p>whostmgrd/11.25</p></blockquote>
<p>As per above error message x3 theme is causing the problem therefore simply move the x3 theme and resinstall it by running the upcp, you can rename the theme under which you are facing the problem.<br />
<script type="text/javascript">// <![CDATA[
    google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
         var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script><br />
<strong>linux@server[~]#cd /usr/local/cpanel/base/frontend</strong></p>
<p><strong>linux@server[~]#mv -v x3 x3-corrupt</strong></p>
<p><strong>linux@server[~]#/scripts/upcp &#8211;force</strong></p>
<p>Now browse the file manager, it will work properly.</p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/01/cpanel-file-manager-giving-404-not-found-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to block referrer from single domain and multiple domains</title>
		<link>http://www.theperfectarts.com/2012/01/how-to-block-referrer-from-single-domain-and-multiple-domains/</link>
		<comments>http://www.theperfectarts.com/2012/01/how-to-block-referrer-from-single-domain-and-multiple-domains/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 00:59:46 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[block referrer]]></category>
		<category><![CDATA[block referrer from .htaccess file]]></category>
		<category><![CDATA[block referrer from multiple domain]]></category>
		<category><![CDATA[block referrer from single domain]]></category>
		<category><![CDATA[how to block referrer]]></category>
		<category><![CDATA[steps to block referrer]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1849</guid>
		<description><![CDATA[Use the following rewrite rule to block the referrer from single domain/web site. RewriteEngine on # Options +FollowSymlinks RewriteCond %{HTTP_REFERER} test\.com [NC] RewriteRule .* &#8211; [F] Similarly you can block the referrer from the multiple sites by using the following rewrite rule in the .htaccess file. RewriteEngine on # Options +FollowSymlinks RewriteCond %{HTTP_REFERER} test\.com [NC,OR] RewriteCond [...]]]></description>
			<content:encoded><![CDATA[<p>Use the following rewrite rule to block the referrer from single domain/web site.<br />
<script type="text/javascript">// <![CDATA[
   google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
        var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script></p>
<blockquote><p><strong>RewriteEngine on</strong><br />
<strong># Options +FollowSymlinks</strong><br />
<strong>RewriteCond %{HTTP_REFERER} test\.com [NC]</strong><br />
<strong>RewriteRule .* &#8211; [F]</strong></p></blockquote>
<p>Similarly you can block the referrer from the multiple sites by using the following rewrite rule in the .htaccess file.<br />
<script type="text/javascript">// <![CDATA[
   google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
        var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script></p>
<blockquote><p><strong>RewriteEngine on</strong><br />
<strong># Options +FollowSymlinks</strong><br />
<strong>RewriteCond %{HTTP_REFERER} test\.com [NC,OR]</strong><br />
<strong>RewriteCond %{HTTP_REFERER} test123\.com</strong><br />
<strong>RewriteRule .* &#8211; [F]</strong></p></blockquote>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/01/how-to-block-referrer-from-single-domain-and-multiple-domains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recreate the jos_session for Joomla script</title>
		<link>http://www.theperfectarts.com/2012/01/recreate-the-jos_session-for-joomla-script/</link>
		<comments>http://www.theperfectarts.com/2012/01/recreate-the-jos_session-for-joomla-script/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 20:32:43 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Mysql + phpmyadmin]]></category>
		<category><![CDATA[Third party script issue]]></category>
		<category><![CDATA[corrupt jos_session]]></category>
		<category><![CDATA[Create new FTP account from cPanel]]></category>
		<category><![CDATA[drop jos_session table]]></category>
		<category><![CDATA[issue with jos_session]]></category>
		<category><![CDATA[joomla jos_session error]]></category>
		<category><![CDATA[jos_session error]]></category>
		<category><![CDATA[jos_session recreation]]></category>
		<category><![CDATA[problem with jos_session]]></category>
		<category><![CDATA[recreate jos_session table]]></category>
		<category><![CDATA[resolve jos_session issue]]></category>
		<category><![CDATA[table jos_session issue]]></category>
		<category><![CDATA[what is jos_session tabke]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1845</guid>
		<description><![CDATA[Some time we face the jos_session session corrupt error message at that time, we can recreate the &#8220;jos_session&#8221; table by running the following query from the phpmyadmin. DROP table if exist `jos_session` CREATE TABLE `jos_session` (   `username` varchar(150) default &#8221;,   `time` varchar(14) default &#8221;,   `session_id` varchar(200) NOT NULL default &#8217;0&#8242;,   `guest` [...]]]></description>
			<content:encoded><![CDATA[<p>Some time we face the jos_session session corrupt error message at that time, we can recreate the &#8220;jos_session&#8221; table by running the following query from the phpmyadmin.<br />
<script type="text/javascript">// <![CDATA[
  google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
       var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script></p>
<blockquote><p><strong>DROP table if exist `jos_session`</strong></p>
<p><strong>CREATE TABLE `jos_session` (</strong><br />
<strong>  `username` varchar(150) default &#8221;,</strong><br />
<strong>  `time` varchar(14) default &#8221;,</strong><br />
<strong>  `session_id` varchar(200) NOT NULL default &#8217;0&#8242;,</strong><br />
<strong>  `guest` tinyint(4) default &#8217;1&#8242;,</strong><br />
<strong>  `userid` int(11) default &#8217;0&#8242;,</strong><br />
<strong>  `usertype` varchar(50) default &#8221;,</strong><br />
<strong>  `gid` tinyint(3) unsigned NOT NULL default &#8217;0&#8242;,</strong><br />
<strong>  `client_id` tinyint(3) unsigned NOT NULL default &#8217;0&#8242;,</strong><br />
<strong>  `data` longtext,</strong><br />
<strong>  PRIMARY KEY  (`session_id`(64)),</strong><br />
<strong>  KEY `whosonline` (`guest`,`usertype`),</strong><br />
<strong>  KEY `userid` (`userid`),</strong><br />
<strong>  KEY `time` (`time`)</strong><br />
<strong>) TYPE=MyISAM CHARACTER SET `utf8`;</strong></p></blockquote>
<p>But make sure that you have taken the backup for the existing database.</p>
<p><script type="text/javascript">// <![CDATA[
  google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script>NOTE : If you have any issue to copy the above query, please refer to the following URL to copy the jos_session table query.</p>
<p>http://www.theperfectarts.com/jos_session.txt</p>
<p><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/01/recreate-the-jos_session-for-joomla-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql tuner to tune mysql service</title>
		<link>http://www.theperfectarts.com/2011/12/mysql-tuner-to-tune-mysql-service/</link>
		<comments>http://www.theperfectarts.com/2011/12/mysql-tuner-to-tune-mysql-service/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 05:42:46 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Basic Linux]]></category>
		<category><![CDATA[Common errors]]></category>
		<category><![CDATA[Dedicated Server Issue]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1783</guid>
		<description><![CDATA[Install the mysql tuner to tune the mysql service to avoid any memory usage due to incorrect settings in the /etc/my.cnf file. Login in to the server as root user and download the mysqltuner.pl file root@linux7802 [~]# cd /usr/local/src/ root@linux7802 [/usr/local/src]# wget -O mysqltuner.pl mysqltuner.pl root@linux7802 [/usr/local/src]# perl mysqltuner.pl Above command will give you the [...]]]></description>
			<content:encoded><![CDATA[<p>Install the mysql tuner to tune the mysql service to avoid any memory usage due to incorrect settings in the /etc/my.cnf file.</p>
<p>Login in to the server as root user and download the mysqltuner.pl file</p>
<p><strong>root@linux7802 [~]# cd /usr/local/src/</strong></p>
<p><strong>root@linux7802 [/usr/local/src]# wget -O mysqltuner.pl mysqltuner.pl</strong></p>
<p><strong>root@linux7802 [/usr/local/src]# perl mysqltuner.pl</strong></p>
<p>Above command will give you the statistics as well as recommendations to improve the server perfomance</p>
<p>Refer to the following image to example of statistics</p>
<p><a href="http://www.theperfectarts.com/wp-content/uploads/2011/12/mysqltune.png"><img class="size-medium wp-image-1784 alignleft" title="mysqltune" src="http://www.theperfectarts.com/wp-content/uploads/2011/12/mysqltune-300x153.png" alt="statistics" width="300" height="153" /></a></p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
      var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script></p>
<p>For recommendations example refer to the following image and made the necessary changes in the /etc/my.cnf file and retest the script to check, if issue resolved or not&#8230;&#8230;</p>
<div id="attachment_1789" class="wp-caption alignleft" style="width: 310px"><a href="http://www.theperfectarts.com/wp-content/uploads/2011/12/recommendations1.png"><img class="size-medium wp-image-1789" title="recommendations" src="http://www.theperfectarts.com/wp-content/uploads/2011/12/recommendations1-300x153.png" alt="recommendations" width="300" height="153" /></a><p class="wp-caption-text">Its an example for recommendations</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Note : Most of the time it recommend to optimize the mysql at that time use the following command but make sure that you have talen backup for the /var/lib/mysql directory to avoid any problem.</p>
<p><strong>mysqlcheck &#8211;optimize -A</strong></p>
<p>&nbsp;</p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2011/12/mysql-tuner-to-tune-mysql-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

