Monday, December 28, 2009

What is the difference between AIM or SIM in Authorize.Net

In SIM (Simple integration Method) customer credit card details are taken on the authorize.net site - no SSL required AIM (Advanced integration Method) Credit card details are taken over your site SSL required - please check setup instructions for more details http://www.ecommercetemplates.com/phphelp/ecommplus/authorizenet.asp

Thursday, November 12, 2009

To view the exim mail log

tail -f /var/log/exim_mainlog

Tuesday, October 20, 2009

Turn dynamic URLs into search engine friendly static URLs

The original URL
------------------
http://www.scriptscart.com/shop.php?cmd=product&category=vehicles&product=bus

The rewritten URL
--------------------
http://www.scriptscart.com/product/vehicles/bus.html

Add the following lines to .htaccess:

RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.html$ /shop.php?cmd=$1&category=$2&product=$3 [L]

Please follow the instructions below to do it.

  1. First you need to check if the file .htaccess exists in the root of your website.
  2. If the file .htaccess exists, download it from your site, add the lines below to the end of the file, and upload the modified file back to your site. Please make a copy of the original file .htaccess. So if anything goes wrong, you may restore the original file.
  3. If the file .htaccess does not exist, create a new file .htaccess and add the lines below to it. Then upload it to the root of your website. You may delete it if anything goes wrong.

Thursday, August 6, 2009

Payment gateways test account

Authorize.net
==========

You can use any of the following test credit card numbers. The expiration date must be set to the present date or later:

370000000000002 American Express Test Card
6011000000000012 Discover Test Card
4007000000027 Visa Test Card
4012888818888 second Visa Test Card
3088000000000017 JCB
38000000000006 Diners Club/ Carte Blanche



google checkout
===========

GoogleMerchant ID : 643760143118924

Google Merchant Key : jk0ACPM8RdntndpuFbqjew

Wednesday, July 1, 2009

How to find how much free space in Hard disk Linux


"df -h"
du -sch *

Monday, June 15, 2009

How to run a crontab entry as "nobody"

Assuming you are the root user on a Linux computer, here's a quick example of how to run a program on a Linux system through a crontab entry, with the program being executed as the user nobody.

Just put this entry in a crontab file (by issuing the "crontab -e" command, for example), and the program named myProgram.sh will be run at 1:30 a.m. using the Bourne shell, and will be run as the user nobody.

30 1 * * * su -c '/path/to/program/myProgram.sh' -s /bin/sh nobody

testing is always recommended, but this has worked for me.

How to create aliases (linux/unix)

Creating aliases is very easy. You can either enter them at the command line as you're working, or more likely, you'll put them in one of your startup files, like your .bashrc file, so they will be available every time you log in.

I created the ll alias by entering the following command into my .bashrc file:

alias ll="ls -al"

/etc/bashrc


Monday, June 1, 2009

Restore a Mysql database from the server backup

root@testserver [/var/lib/mysql]# mysql testsite_support < /backup/cpbackup/weekly/testsite/mysql/testsite_support.sql

Thursday, March 26, 2009

.htaccess 301 redirection

.htaccess 301 redirection

RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]


Alternate method is


ServerName www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /home/username/public_html

ServerName example.com
RedirectMatch permanent ^/(.*) http://www.example.com/$1


For more details refer http://www.seobook.com/archives/001714.shtml

Wednesday, March 25, 2009

To increase memory limit using .htaccess

To increase memory limit using .htaccess

Put a .htaccess file with the following code in the particular directory


php_value memory_limit 128M

To get the cpanel username

To get the cpanel username

First login to the server as 'root' then

grep domainname.com /etc/userdomains

Friday, March 20, 2009

To get the file names only using grep

To get the file names only using grep command

grep findword . -ir | cut -d: -f1

To search in the .php files only

find . -name "*.php" | grep findword -ir | cut -d: -f1

Tuesday, January 27, 2009

How to add a user in the freeBSD using a shell script?

Adding a user in the FreeBSD using a shell script

touch useradd.txt
echo "$linux_login::::::::bash:" > useradd.txt


/usr/sbin/adduser -f useradd.txt -k $skeldir $linux_login -w no


sample useradd.txt file
-----------------------
test::::::::bash: