How to enable IE6-7-8 compatibility view in Internet Explorer 8

Are you a web-developer? Do you want to earn more money? Join our affiliate program, offer our hosting to your customers and get paid. Or just switch to our professional hosting for $8.95 per month!

There are two ways of viewing the page as in IE6, IE7 in Internet Explorer 8:

  1. Click on the “Page” > “Compatibility view”
  2. Add a special HTML tag for the page you wish to view as in IE6 or IE7:

    <html>
    <head>
      <!-- Mimic Internet Explorer 7 -->
      <meta 
      http-equiv="X-UA-Compatible" 
      content="IE=EmulateIE7" >
      <title>My Web Page</title>
    </head>
    <body>
      <p>Content goes here.</p>
    </body>
    </html>
    

How to transfer website from Netfirms to 2by2host

Transferring your site from NetFirms to 2by2host

There are two ways of doing that: 1). complicated and 2). very complicated for an average user. Decide which one to use based on your experience. The steps are the following:

Easy and fast transfer from NetFirms to 2by2host

  • First of all you need to enable SSH. To do that log in to your account and go to “Hosting > Settings > SSH > Enable”.
  • Login to SSH and create a tar archive of the domain you're going to transfer
  • Copy created tar archive to a publicly visible folder on your website:

    cp archive.tar.gz /public_html/

  • Once copied you need to download the archive and copy it from the old server to us

    wget -c http://domain.name.com/archive.tar.gz

  • Now it's time to create a dump of a database connected to your website (if any)

    /usr/local/nf/bin/mysqldump -e –force –quick -h mysqlhost -u Username -pPassword DatabseName > BackupFile.sql

    or

    mysql -u Username -pPassword DatabseName > BackupFile.sql

  • Once we are on our server we need to unpack the downloaded file into the home directory of a domain

    tar -xvf archive.tar.gz

  • After we unpacked the archive we need to make sure the permissions of the transferred websites are correct

    chown username:usergroup * -R

  • If there were any databases, create them using cpanel
  • Change DB(s) login and site path settings in website's files (if any)
  • Import downloaded databases into created ones on our server

    mysql -u Username -pPassword DatabseName < BackupFile.sql

English StopWords for PHP

Below is the list of commonly used words (commonly occurring words ignored by search engines):

$2by2host_stopwords = array(

“a”,
“able”,
“about”,
“above”,
“abroad”,
“according”,
“accordingly”,
“across”,
“actually”,
“adj”,
“after”,
“afterwards”,
“again”,
“against”,
“ago”,
“ahead”,
“ain't”,
“all”,
“allow”,
“allows”,
“almost”,
“alone”,
“along”,
“alongside”,
“already”,
“also”,
“although”,
“always”,
“am”,
“amid”,
“amidst”,
“among”,
“amongst”,
“an”,
“and”,
“another”,
“any”,
“anybody”,
“anyhow”,
“anyone”,
“anything”,
“anyway”,
“anyways”,
“anywhere”,
“apart”,
“appear”,
“appreciate”,
“appropriate”,
“are”,
“aren't”,
“around”,
“as”,
“a's”,
“aside”,
“ask”,
“asking”,
“associated”,
“at”,
“available”,
“away”,
“awfully”,
“b”,
“back”,
“backward”,
“backwards”,
“be”,
“became”,
“because”,
“become”,
“becomes”,
“becoming”,
“been”,
“before”,
“beforehand”,
“begin”,
“behind”,
“being”,
“believe”,
“below”,
“beside”,
“besides”,
“best”,
“better”,
“between”,
“beyond”,
“both”,
“brief”,
“but”,
“by”,
“c”,
“came”,
“can”,
“cannot”,
“cant”,
“can't”,
“caption”,
“cause”,
“causes”,
“certain”,
“certainly”,
“changes”,
“clearly”,
“c'mon”,
“co”,
“co.”,
“com”,
“come”,
“comes”,
“concerning”,
“consequently”,
“consider”,
“considering”,
“contain”,
“containing”,
“contains”,
“corresponding”,
“could”,
“couldn't”,
“course”,
“c's”,
“currently”,
“d”,
“dare”,
“daren't”,
“definitely”,
“described”,
“despite”,
“did”,
“didn't”,
“different”,
“directly”,
“do”,
“does”,
“doesn't”,
“doing”,
“done”,
“don't”,
“down”,
“downwards”,
“during”,
“e”,
“each”,
“edu”,
“eg”,
“eight”,
“eighty”,
“either”,
“else”,
“elsewhere”,
“end”,
“ending”,
“enough”,
“entirely”,
“especially”,
“et”,
“etc”,
“even”,
“ever”,
“evermore”,
“every”,
“everybody”,
“everyone”,
“everything”,
“everywhere”,
“ex”,
“exactly”,
“example”,
“except”,
“f”,
“fairly”,
“far”,
“farther”,
“few”,
“fewer”,
“fifth”,
“first”,
“five”,
“followed”,
“following”,
“follows”,
“for”,
“forever”,
“former”,
“formerly”,
“forth”,
“forward”,
“found”,
“four”,
“from”,
“further”,
“furthermore”,
“g”,
“get”,
“gets”,
“getting”,
“given”,
“gives”,
“go”,
“goes”,
“going”,
“gone”,
“got”,
“gotten”,
“greetings”,
“h”,
“had”,
“hadn't”,
“half”,
“happens”,
“hardly”,
“has”,
“hasn't”,
“have”,
“haven't”,
“having”,
“he”,
“he'd”,
“he'll”,
“hello”,
“help”,
” “,
“hence”,
“her”,
“here”,
“hereafter”,
“hereby”,
“herein”,
“here's”,
“hereupon”,
“hers”,
“herself”,
“he's”,
“hi”,
“him”,
“himself”,
“his”,
“hither”,
“hopefully”,
“how”,
“howbeit”,
“however”,
“hundred”,
“i”,
“i'd”,
“ie”,
“if”,
“ignored”,
“i'll”,
“i'm”,
“immediate”,
“in”,
“inasmuch”,
“inc”,
“inc.”,
“indeed”,
“indicate”,
“indicated”,
“indicates”,
“inner”,
“inside”,
“insofar”,
“instead”,
“into”,
“inward”,
“is”,
“isn't”,
“it”,
“it'd”,
“it'll”,
“its”,
“it's”,
“itself”,
“i've”,
“j”,
“just”,
“k”,
“keep”,
“keeps”,
“kept”,
“know”,
“known”,
“knows”,
“l”,
“last”,
“lately”,
“later”,
“latter”,
“latterly”,
“least”,
“less”,
“lest”,
“let”,
“let's”,
“like”,
“liked”,
“likely”,
“likewise”,
“little”,
“look”,
“looking”,
“looks”,
“low”,
“lower”,
“ltd”,
“m”,
“made”,
“mainly”,
“make”,
“makes”,
“many”,
“may”,
“maybe”,
“mayn't”,
“me”,
“mean”,
“meantime”,
“meanwhile”,
“merely”,
“might”,
“mightn't”,
“mine”,
“minus”,
“miss”,
“more”,
“moreover”,
“most”,
“mostly”,
“mr”,
“mrs”,
“much”,
“must”,
“mustn't”,
“my”,
“myself”,
“n”,
“name”,
“namely”,
“nd”,
“near”,
“nearly”,
“necessary”,
“need”,
“needn't”,
“needs”,
“neither”,
“never”,
“neverf”,
“neverless”,
“nevertheless”,
“new”,
“next”,
“nine”,
“ninety”,
“no”,
“nobody”,
“non”,
“none”,
“nonetheless”,
“noone”,
“no-one”,
“nor”,
“normally”,
“not”,
“nothing”,
“notwithstanding”,
“novel”,
“now”,
“nowhere”,
“o”,
“obviously”,
“of”,
“off”,
“often”,
“oh”,
“ok”,
“okay”,
“old”,
“on”,
“once”,
“one”,
“ones”,
“one's”,
“only”,
“onto”,
“opposite”,
“or”,
“other”,
“others”,
“otherwise”,
“ought”,
“oughtn't”,
“our”,
“ours”,
“ourselves”,
“out”,
“outside”,
“over”,
“overall”,
“own”,
“p”,
“particular”,
“particularly”,
“past”,
“per”,
“perhaps”,
“placed”,
“please”,
“plus”,
“possible”,
“presumably”,
“probably”,
“provided”,
“provides”,
“q”,
“que”,
“quite”,
“qv”,
“r”,
“rather”,
“rd”,
“re”,
“really”,
“reasonably”,
“recent”,
“recently”,
“regarding”,
“regardless”,
“regards”,
“relatively”,
“respectively”,
“right”,
“round”,
“s”,
“said”,
“same”,
“saw”,
“say”,
“saying”,
“says”,
“second”,
“secondly”,
“see”,
“seeing”,
“seem”,
“seemed”,
“seeming”,
“seems”,
“seen”,
“self”,
“selves”,
“sensible”,
“sent”,
“serious”,
“seriously”,
“seven”,
“several”,
“shall”,
“shan't”,
“she”,
“she'd”,
“she'll”,
“she's”,
“should”,
“shouldn't”,
“since”,
“six”,
“so”,
“some”,
“somebody”,
“someday”,
“somehow”,
“someone”,
“something”,
“sometime”,
“sometimes”,
“somewhat”,
“somewhere”,
“soon”,
“sorry”,
“specified”,
“specify”,
“specifying”,
“still”,
“sub”,
“such”,
“sup”,
“sure”,
“t”,
“take”,
“taken”,
“taking”,
“tell”,
“tends”,
“th”,
“than”,
“thank”,
“thanks”,
“thanx”,
“that”,
“that'll”,
“thats”,
“that's”,
“that've”,
“the”,
“their”,
“theirs”,
“them”,
“themselves”,
“then”,
“thence”,
“there”,
“thereafter”,
“thereby”,
“there'd”,
“therefore”,
“therein”,
“there'll”,
“there're”,
“theres”,
“there's”,
“thereupon”,
“there've”,
“these”,
“they”,
“they'd”,
“they'll”,
“they're”,
“they've”,
“thing”,
“things”,
“think”,
“third”,
“thirty”,
“this”,
“thorough”,
“thoroughly”,
“those”,
“though”,
“three”,
“through”,
“throughout”,
“thru”,
“thus”,
“till”,
“to”,
“together”,
“too”,
“took”,
“toward”,
“towards”,
“tried”,
“tries”,
“truly”,
“try”,
“trying”,
“t's”,
“twice”,
“two”,
“u”,
“un”,
“under”,
“underneath”,
“undoing”,
“unfortunately”,
“unless”,
“unlike”,
“unlikely”,
“until”,
“unto”,
“up”,
“upon”,
“upwards”,
“us”,
“use”,
“used”,
“useful”,
“uses”,
“using”,
“usually”,
“v”,
“value”,
“various”,
“versus”,
“very”,
“via”,
“viz”,
“vs”,
“w”,
“want”,
“wants”,
“was”,
“wasn't”,
“way”,
“we”,
“we'd”,
“welcome”,
“well”,
“we'll”,
“went”,
“were”,
“we're”,
“weren't”,
“we've”,
“what”,
“whatever”,
“what'll”,
“what's”,
“what've”,
“when”,
“whence”,
“whenever”,
“where”,
“whereafter”,
“whereas”,
“whereby”,
“wherein”,
“where's”,
“whereupon”,
“wherever”,
“whether”,
“which”,
“whichever”,
“while”,
“whilst”,
“whither”,
“who”,
“who'd”,
“whoever”,
“whole”,
“who'll”,
“whom”,
“whomever”,
“who's”,
“whose”,
“why”,
“will”,
“willing”,
“wish”,
“with”,
“within”,
“without”,
“wonder”,
“won't”,
“would”,
“wouldn't”,
“x”,
“y”,
“yes”,
“yet”,
“you”,
“you'd”,
“you'll”,
“your”,
“you're”,
“yours”,
“yourself”,
“yourselves”,
“you've”,
“z”,
“zero”,

);

How to list all MySQL queries

Ever wondered how to list all MySQL queries running on your server? This can be helpful when troubleshooting server loads. Run this command from shell:

mysqladmin proc

How to create a tar.gz archive of a directory

It's very simple, as most of the commands in Linux/Unix:

  • Login to your *nix box via SSH or a terminal
  • Run command
    tar -czvf name_of_archive.tar.gz name_of_folder/

The archive will be created in the folder from which you ran the command.

Have any issues with your Linux system or with the tar command? Ask our specialists, using the form on the right side.

How to get a size of a directory in Linux

To get a directory size, run this command from the directory:

du -shm

What do the parameters above mean?

  • -s — summarize the sizes of all available files in a folder
  • -h — show resulted value in Human readable format
  • -m — show the result in Megabytes
  • How to list all available databases in MySQL

    Show databases from MySQL prompt

    Log in as root to your MySQL server, using the following command:

    mysql -u root -ppassword

    After a successful login you will be in MySQL shell. Run the following command:

    SHOW DATABASES

    You should see all available databases

    How to display, list or show your databases without logging in to MySQL

    Run the following command and you will see the list of all databases

    mysqlshow -u user -ppassword

    Show tables in a particular database

    Add a name of the database at the end of the command above

    mysqlshow -u user -ppassword databasename

    Getting root password in Ubuntu

    The root user is not obvious in Ubuntu after the set up in fact only root access can be gained by using the sudo command. For example, you can use it to update your repository list.

    To run any other command that requires root privileges just add in front of it and enter the administrative password (or your own password if you are the only user on the system).

    How to run mysqldump command

    Backup a single database:

    Run from your terminal window to get a database dump:

    mysqldump -u username -ppassword database_name > dump.sql

    Backup all available databases:

    Run from your terminal window to get dump of all databases:

    mysqldump -u username -ppassword -all-databases > dump.sql

    Please note, that all databases in the example above will be dumped as a single file.