Thứ Hai, 15 tháng 4, 2013

Add Facebook Like Button in Blogger blogspot 2013

How to add Facebook like button in Blogger BlogSpot 2013

Step 1 : 

Login to blogger.com , Go to your Blogger dashboard , Click on template , Edit Html ,  
Click on Expand Widget Templates  and   
Place Facebook JavaScript SDK Code give below on  Blogger template
Just after opening of your <Body> Tag or Just Before closing  of your <Body> Tag,
you can also ass Code between <Body> tag .
This Code plays important role Without this Facebook JavaScript SDK Code your Facebook code will not work properly for Multi-page ,
By placing this Facebook JavaScript SDk code in < Body > tag , Every post of your blogger blog will work fine with proper counting
<div id="fb-root"></div>
<script>(function(d, s, id) {  
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
</script> 

Step 2 : Now Place Code FB Like Button in blogger , where you want to render Facebook like Button . You can add this Code to blogger using Add widgets  , also you can Facebook like button below post title .

<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"> </div> 

Watch on youtube how to add Facebook Like and send button to Blogger


Read More

Exim Remove All messages From the Mail Queue

Question:

 I'm using Exim mail server under CentOS Linux. How do I remove all messages from the Exim mail queue using a shell prompt?

Answer:
Exim is a mail transfer agent (MTA) used on Unix-like operating systems. It aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail.

To print a list of the messages in the queue, enter:

# exim -bp

To remove a message from the queue, enter:

# exim -Mrm {message-id}

To remove all messages from the queue, enter:

# exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash
Dallas Marlow, suggested following clean command:
# exim -bp | exiqgrep -i | xargs exim -Mrm
DELETE FROZEN MAILS
/usr/sbin/exim -bp | awk '$6~"frozen" { print $3 }' | xargs /usr/sbin/exim -Mrm
REMOVE MAILS FROM SENDER
/usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs /usr/sbin/exim -Mrm 
OR 
/usr/sbin/exim -bp | awk '$4~"info@domain.com" { print $3 }' | xargs /usr/sbin/exim -Mrm


Read More

How to block emails from a specific address using Exim

Issue :
How to block emails from a specific address on a cPanel/WHM server using Exim ?
Solution :
This is fairly easy to achieve with Exim.
First you’ll need to find the system filter file for Exim. This can be found out through WHM >> Main >> Service Configuration >> Exim Configuration Editor.
Towards the middle of the page, under the section ‘Filters’ , you ‘ll find the path to the file.
Open that file via SSH using your favorite editor and add the following to it :
if first_delivery
and ( (“$h_from:” contains “emailtoblock@domainname.com”)
)
then fail
endif
Read More

Install ConfigServer Apps On A cPanel/WHM Server





ConfigServer provide a range of paid and free applications, including a significantly more advanced firewall, that plug directly into WHM on your cPanel server. These applications are highly recommended for anyone who is serious about the security of their cPanel Server, as they not only provide enhanced security functionality, but also allow you to easily manage a number of other basic cPanel functions, such as mail settings, mail queues, and a more advanced ModSecurity tool.
Below is a list of the free applications that we will be providing the simple installation instructions for:
  1. CSF - this is an advanced firewall system utilising Linux ip tables
  2. Mail Manage – allows you to adjust mail settings, such as hourly limits and email forwarders, on a per account basis
  3. Mail Queues – easily manage your email queues with the ability to force run the queue and delete stuck messages
  4. ModSecurity Control – if you have installed ModSecurity on your cPanel Server, this provide an advanced management interface
  5. Explorer – This is a file system explorer web interface which allows you to also run basic shell commands within folders – WARNING: While this utility can be very useful it is also very dangerous indeed. You can easily render your server inoperable and unrecoverable by performing ill advised actions. No warranty or guarantee is provided with the product that protects against system damage.
NOTE: All of the installations below require you to be logged into SSH as root.
Install ConfigServer Security & Firewall
rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
Remove installation files:
cd ..
rm -Rfv csf/ csf.tgz
Install ConfigServer Mail Manage
rm -fv cmm.tgz
wget http://www.configserver.com/free/cmm.tgz
tar -xzf cmm.tgz
cd cmm
sh install.sh
Remove installation files:
cd ..
rm -Rfv cmm/ cmm.tgz
To uninstall:
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_cmm.cgi
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/cmmversion.txt
rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/cmm/
Install ConfigServer Mail Queues
rm -fv cmq.tgz
wget http://www.configserver.com/free/cmq.tgz
tar -xzf cmq.tgz
cd cmq
sh install.sh
Remove installation files:
cd ..
rm -Rfv cmq/ cmq.tgz
To uninstall:
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_cmq.cgi
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/cmqversion.txt
rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/cmq/
Install ConfigServer ModSecurity Control
rm -fv cmc.tgz
wget http://www.configserver.com/free/cmc.tgz
tar -xzf cmc.tgz
cd cmc
sh install.sh
Remove installation files:
cd ..
rm -Rfv cmc/ cmc.tgz
To uninstall:
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_cmc.cgi
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/cmcversion.txt
rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/cmc/
Install ConfigServer Explorer
rm -fv cse.tgz
wget http://www.configserver.com/free/cse.tgz
tar -xzf cse.tgz
cd cse
sh install.sh
Remove installation files:
cd ..
rm -Rfv cse/ cse.tgz
To uninstall:
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_cse.cgi
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/cseversion.txt
If you run into any issue with the install, just head over to the ConfigServer forums and you’ll find plenty of people who can assist you.

Read More

Chủ Nhật, 14 tháng 4, 2013

How to Rename .MDF File and .LDF file

Some time in project lifecycle will definitely required to rename .MDF file , Mostly during deployment at various stages.
Lets see how we can achieve same !!
For example we have Audit Test as database in our server as shown

It have MDF file and LDF file as shown in following drives @ physical location

Fire a following query first
ALTER DATABASE AuditTest SET OFFLINE
It will make off the Database as shown


Now till the time your database is off we have to go manually and make rename option to both MDF and LDF file

But we have register this or make SQL server aware of this event so now type alter script execute the following script in SSMS
GO
ALTER DATABASE AuditTest
MODIFY FILE (NAME =AuditTest,
FILENAME =
'C:\Program Files\Microsoft SQL Server\
MSSQL10_50.MSSQLSERVER\MSSQL\DATA\RenameAudit.mdf')

GO

ALTER DATABASE AuditTest
MODIFY FILE (NAME = AuditTest_log,
FILENAME ='C:\Program Files\Microsoft SQL Server\
MSSQL10_50.MSSQLSERVER\MSSQL\DATA\RenameAudit.ldf')

GO
And set our Database on again for its usability
ALTER DATABASE AuditTest SET ONLINE
GO

So Output of all above script is shown

Hope this helps !!
Read More

ERROR: SWKeyExFatalError

Errors when trying to open Parallels Plesk Panel

APPLIES TO:
  • Parallels Plesk Panel 9.x for Windows

Symptoms

It is not possible to access Parallels Plesk Panel. Browser displays one of the following errors:

ERROR: SWKeyExFatalError
xmlrpc error: XML parsing failed

0: common_func.php3:4523
of_get_key_by_product(string 'plesk-win')
1: common_func.php3:4523
getPleskKey()
2: common_func.php3:4602
getKeyProp(string 'demo')
3: auth.php3:54

Fatal error: Call to undefined function of_get_key_by_product() in C:\plesk\admin\plib\common_func.php3 on line 4501

It is also not possible to retrieve the key number with the utility keymng.exe, due to an unexpected error:
>"%plesk_bin%\keymng.exe" --get-key-number
Unexpected error


Cause

The above error indicates that registry.xml file may have gone corrupted.

Resolution

Check the size of the file %plesk_dir%\admin\repository\registry.xml. If the file is empty and equals 0KB, delete this file.
Once it is deleted, try to access Parallels Plesk Panel again. A new file should have been generated automatically.
Read More