Monday, September 23, 2013

Magento pre-checks – how to install curl, gd, mcrypt, and pdo using cpanel whm

I searched for hours and hours after I attempted to install Magento on a godaddy vps only to get this:
Your server does not meet the following requirements in order to install Magento.
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:
  • You are missing the curl extension
  • You are missing the gd extension
  • You are missing the mcrypt extension
  • You are missing the pdo_mysql extension
  • You are missing the pdo extension
The following requirements were successfully met:
  • You have PHP 5.2.0 (or greater)
  • Safe Mode is off
  • You have MySQL 4.1.20 (or greater)
  • You have the dom extension
  • You have the hash extension
  • You have the iconv extension
  • You have the pcre extension
  • You have the simplexml extension
After hours of searching I found “pecl install pdo” which worked great to address the pdo and pdo_mysql extension issues.  But sadly, “pecl install curl” did nothing (btw, its not supposed to – but I was hopeful).  I found a lot of information about updating the php.ini – most of which talked about removing the ; from the lines required to enable curl, gd, and mcrypt.  Which I did – then restarted apache, then restarted my server, then rebooted my laptop… ok, the laptop was because I loaded patches to it completely unrelated to my server problem, but why not throw that in there?
I found several posts saying “just run /scripts/easyapache”.  Most of these posts assume a certain level of knowledge that I obviously didn’t have.  Once I found that I can actually just type “/scripts/easyapache” at an SSH command line (I know I may have just ‘assumed’ a level of knowledge you may not have but keep reading, it gets easy!)  I ran easyapache and was presented with a text based menu that made no sense to me.  I felt like I was on the right track, but still not there.  The forum where I found the easyapache hint (http://forums.theplanet.com/index.php?showtopic=26527) had several comments with questions about what it does and how to use it – but one comment caught my eye by Erwin:
In CPanel 7, you can now do this in WHM by going to the Software section and choosing: Update Apache
Then choose mcrypt or any other module you want to recompile PHP with.
And it will do so automatically. icon_smile.gif Similar to easyapache, but easier to use. icon_smile.gif I upgraded to PHP 4.3.2 just like that with the modules I want.
So I tried that – realizing the post was pretty old and my screens might be very different.  They were, but I was able to work it out. I went to
  • “Main >> Software >> EasyApache (Apache Update)”.
  • Then I selected the PHP Encryption / E-commerce option.
  • Then “start customizing based on profile”.
  • From there I selected Apache 2.2 (I was currently running 2.0),
  • clicked Next and selected php5, selected build 5.3.2,
  • scroll to the bottom of the page and click “
  • Now we are COOKING! – you can now select curl, gd, mcrypt, pdo, and a whole host of other options.
After selecting those options, I clicked ““.  Now it goes and goes while building apache with all of the options you selected – NO COMPILING, MAKE, MAKE INSTALL, ETC!  It does all of that for you!
I go back to my magento-check.php page and I’m in magento precheck heaven:
Congratulations! Your server meets the requirements for Magento.
  • You have PHP 5.2.0 (or greater)
  • Safe Mode is off
  • You have MySQL 4.1.20 (or greater)
  • You have the curl extension
  • You have the dom extension
  • You have the gd extension
  • You have the hash extension
  • You have the iconv extension
  • You have the mcrypt extension
  • You have the pcre extension
  • You have the pdo extension
  • You have the pdo_mysql extension
  • You have the simplexml extension

Friday, July 26, 2013

HowTo Enable or disable modules in Apache

You can enable or disable any apache module using a2enmod and a2dismod. You don’t need to edit the conf file for that unless you are having some problem with this method. The syntax of these commands is really simple:
To enable a module:
sudo a2enmod module_name
To disable a module:
sudo a2dismod module_name

For instance, to enable mod_expires, execute sudo a2enmod expires in the terminal. If you see the following output, you can be sure that it has been enabled.
dpac@dpac-laptop:~$ sudo a2enmod expires
Enabling module expires.
Run '/etc/init.d/apache2 restart' to activate new configuration!
To disable mod_expires:
sudo a2dismod expires
Restart the server after enabling the module.
sudo service apache2 restart
Or
sudo /etc/init.d/apache2 restart
PS: On linux systems, you can use auto-complete feature by pressing tab with a2enmod and a2dismod. It will show list of mods installed on your system.

Monday, July 8, 2013

How to trouble shoot Joomla CMS:

Somtime when you transfer your joomla website from one to another host joomla website stop responding and sometime show blank index and admin pages. This may be to conflicting somting,

So how we can check exactly which plugin or component or module is causing the problem?

Here is a Quick Method:

1..Install new joomla
2..on this new joomla installation Install as much component and plugins and module you

have that was in previous faulty CMS. (specially install K2).
3..upload your backup files into "Backup" folder.
4..Import your backup database into mysql.
5..take backup of all new joomla installation files and folder into "joomla" folder.
6..edit joomla configuration file and connect with your backup database.
7..copy template folder from "Backup" folder.
8..refresh the home page.
9..now copy one by one subfolders of plugin, Component, modules from "Backup".
and refresh the home page each time you copy the folder to see the effect.

when you see page blank or any error after copying any folder, revert it back from

"joomla" folder and note down the module or plugin folder name which is causing problem.

10..when you found the exact plugin or modules you can just disable from joomla admin panel.

The Best thing of this method, you can login from admin panel and you will see all option where you can disable SEF URL (which usualy caused problem) and all module, component  and plugins.

Sunday, July 7, 2013

How to Disable GUI Boot in Ubuntu 12.04

Following the steps I followed to enable console boot in Ubuntu 12.04
Step 1 First update your repository by running
sudo apt-get update
Step 2 There is some bug in old version of lightdm, so we need to upgrade the same. To do so run,
sudo apt-get install lightdm
Step 3 Now we have to modify grub config.
Step 3a Open /etc/default/grub with your faviourite editor and change
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT="text"
Step 3b Also comment GRUB_HIDDEN_TIMEOUT=0 This line is for unhiding the GRUB menu

Step 4 Now we will upgrade GRUB configuration
sudo update-grub
Step 5 Now restart your machine. Voilla you will be in console mode
At any time you need after booting your system you want to change to gui mode the run
startx
If you want to restore Ubuntu’s GUI mode then

Open /etc/default/grub with your faviourite editor and change
GRUB_CMDLINE_LINUX_DEFAULT="text"
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Update GRUB by running
sudo update-grub
That’s it

How to Make Your Own Light Box

What is a light box? It's a photo studio in miniature. Shooting photos in the lightbox keeps the focus completely on the items you want to depict; there are no distractions in the background (which is white, or whatever color you choose to make it) and lighting from three sides eliminates any shadows. Click on the photos below to see the steps.






By lighting through the paper, the light is diffused and prevents stark reflections and shadows.
Two more tips:
  • If you can, use lamps/light bulbs that imitate natural light. Otherwise, your background will appear slightly yellow, like in the picture below with the apple.
  • Always take the photos without flash

Tuesday, July 2, 2013

Image to Vector in Photoshop

Learn how to create vector photo effect out of any image, clipart, graphics. You can obtain vector ink photo effects in just a few simple steps. I am planning to automate these steps into a Photoshop action that you can easily use and customize. In the meantime you can use Photoshop adjustments and filters like Photocopy and Threshold to create this vector effect.
In this tutorial I am going to show you a simple way to create a image to vector effect using any photo/image/graphics/etc. In the next tutorial I am going to show you how simple it is to turn from photo to vector shape in Photoshop. So let's start with this girl stock image; you can use any image you want but if you want to create vector silhouetts the best are the photos with white/black background. Or better still you can use cutout images.
Duplicate this layer and call the layers Girl 1 Layer and Girl 2 Layer. You can also keep a copy of the original layer. Go to Image>Adjustments and use the Threshold adjustment for the Girl 1 Layer. Set the level depending on your photo size, details, etc.
Set the foreground color black and the background color white. Go to Filter>Sketch and use the Photocopy filter for the Girl 2 Layer.
Set the blend mode of the Girl 2 Layer to Multiply and merge the two layers.
Use again the Threshold adjustment for the new created layer.
For a smooth edge result you can go to Filter>Stylize and choose Diffuse
This is how you can convert image to vector effect. You can now use the Paint Brush, color black to close the gaps and to use the Paint Bucket Tool if you want to add color. I have also added a vector sunburst using these free sunburst brushes to create a vector comics background. A similar technique I have used in one of my oldest tutorials on how to create a comic book effect in Photoshop

Tuesday, June 18, 2013

How to Set Up SSH Keys

About SSH Keys


SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. While a password can eventually be cracked with a brute force attack, SSH keys are nearly impossible to decipher by brute force alone. Generating a key pair provides you with two long string of characters: a public and a private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. You can increase security even more by protecting the private key with a passphrase.

Step One—Create the RSA Key Pair


The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):
ssh-keygen -t rsa

Step Two—Store the Keys and Passphrase


Once you have entered the Gen Key command, you will get a few more questions:
Enter file in which to save the key (/demo/.ssh/id_rsa):

You can press enter here, saving the file to the user home (in this case, my example user is called demo).
Enter passphrase (empty for no passphrase):

It's up to you whether you want to use a passphrase.

Entering a passphrase does have its benefits: the security of a key, no matter how encrypted, still depends on the fact that it is not visible to anyone else. Should a passphrase-protected private key fall into an unauthorized users possession, they will be unable to log in to its associated accounts until they figure out the passphrase, buying the hacked user some extra time. The only downside, of course, to having a passphrase, is then having to type it in each time you use the Key Pair.

The entire key generation process looks like this:
ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/demo/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /demo/.ssh/id_rsa.
Your public key has been saved in /demo/.ssh/id_rsa.pub.
The key fingerprint is:
4a:dd:0a:c6:35:4e:3f:ed:27:38:8c:74:44:4d:93:67 demo@a
The key's randomart image is:
+--[ RSA 2048]----+
|          .oo.   |
|         .  o.E  |
|        + .  o   |
|     . = = .     |
|      = S = .    |
|     o + = +     |
|      . o + o .  |
|           . o   |
|                 |
+-----------------+

The public key is now located in /demo/.ssh/id_rsa.pub

The private key (identification) is now located in /demo/.ssh/id_rsa

Step Three—Copy the Public Key


Once the key pair is generated, it's time to place the public key on the virtual server that we want to use.

You can copy the public key into the new machine's authorized_keys file with the ssh-copy-id command. Make sure to replace the example username and IP address below.
ssh-copy-id user@123.45.56.78

Alternatively, you can paste in the keys using SSH:
cat .ssh/id_rsa.pub | ssh user@123.45.56.78 "cat >> ~/.ssh/authorized_keys"

No matter which command you chose, you should see something like:
The authenticity of host '12.34.56.78 (12.34.56.78)' can't be established.
RSA key fingerprint is b1:2d:33:67:ce:35:4d:5f:f3:a8:cd:c0:c4:48:86:12.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '12.34.56.78' (RSA) to the list of known hosts.
user@12.34.56.78's password: 
Now try logging into the machine, with "ssh 'user@12.34.56.78'", and check in:

  ~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

Now you can go ahead and log into user@12.34.56.78 and you will not be prompted for a password. However, if you set a passphrase, you will be asked to enter the passphrase at that time (and whenever else you log in in the future).

Optional Step Four—Disable the Password for Root Login

Once you have copied your SSH keys unto your server and ensured that you can log in with the SSH keys alone, you can go ahead and restrict the root login to only be permitted via SSH keys.

In order to do this, open up the SSH config file:
sudo nano /etc/ssh/sshd_config

Within that file, find the line that includes PermitRootLogin and modify it to ensure that users can only connect with their SSH key:
PermitRootLogin without-password

Put the changes into effect:
reload ssh
 
 
Source: 
https://www.digitalocean.com/community/articles/how-to-set-up-ssh-keys--2 

Sunday, June 16, 2013

Copying a Joomla website

This tutorial is for Joomla! CMS Version(s) Joomla 2.5 Joomla 3.x

Copying a Joomla! website is a two-part process: you must copy the files and you must copy the database (which is where the content is stored). Copying the files and copying the database are separate operations. Which you carry out first will depend on your particular circumstances but in most cases it does not really matter. If your website is being updated frequently and you need to take your website offline while the copy takes place then you will probably want to perform the database copy last so as to minimize downtime.

Copying a website (common method)

Copying the files with FTP

One method of copying the files from one Joomla! installation to another is to use standard desktop FTP software to first download all of the files comprising your Web site from their location on your Web server, then upload these files to the location of the new Joomla! installation. Depending on where you're placing the copy of your Joomla! site, the new location could be a different directory on the same Web server, or it could be a new location on a completely different Web server.
It is important to maintain the same directory structure for all of your folders and files as you move them from one location to another. Fortunately, desktop FTP software will handle this automatically as you upload and download sets of files and folders. (Your FTP software should contain Help documentation which explains FTP and how to use the FTP software interface.)
Note that after you move the files from one location to another, you may still need to edit Joomla! configuration files to get your copy of Joomla! working at the new location; you may also need to change settings for aspects of your Web server to get the copy of your Joomla! site working.
In rare instances, a file may become corrupted during an FTP transfer, where only part of the file is successfully transmitted. If you encounter strange or unexpected errors with your new Joomla! installation after you copy over the files, you may want to try re-uploading your files in case of corruption during transfer.

Download files from server to your computer

  1. Use FTP software (e.g. FileZilla) to connect to the server
  2. Select the directory you want to download (mostly /public_html/ or /htdocs/)
  3. Right click + select files/folder to download, or drag + drop the folder from the "Remote site" view to the "Local site" view
  4. The downloading of the remote files will start
  5. After you've downloaded the files, check the "Failed transfers" to see if there weren't any errors

Upload files from your computer to a server

  1. Make sure that configuration.php has the right settings for the server (especially: localhost, database, database user, database password, log_path, tmp_path)
  2. Use FTP software (e.g. FileZilla) to connect to the server
  3. Select the directory you want to upload, and to where (mostly to /public_html/ or /htdocs/)
  4. Right click + select files/folder to upload, or drag + drop the folder from the "Local site" view to the "Remote site" view
  5. The uploading of the local files to the remote server will start
  6. After you've uploaded the files, check the "Failed transfers" to see if there weren't any errors


Copying the database with phpMyAdmin

The phpMyAdmin tool can be used to export and import a database, providing a simple way to duplicate a copy of a database using a different name on our servers.

Exporting a copy of the database to your computer

  1. Login to the database that you want to duplicate using phpMyAdmin
  2. Click the database name on the left-hand side of the page.
  3. Select the Export tab
  4. Select the Save as file option
  5. Click Go
You'll then be prompted to save the database file on your personal computer.

Importing the copy into a new database

You'll first need to create the new, empty database on your server using the account control panel. It needs to be UTF8 (utf8_generic_ci). After the new database has been created:
  1. Login to the new database using phpMyAdmin
  2. Click the database name on the left-hand side of the page
  3. Select the Import tab
  4. Click the Browse button under "File to import", then select the database file from your computer
  5. Click Go to import the database
Hint: If you see a "No database selected" error, it's probably because you forgot to first click on the database name in the left-hand column.

Changing configuration.php

In order to get Joomla to work on the new server, you should make the necessary changes in configuration.php to reflect the new server settings. You should check/edit the following to
        var $host = 'localhost'; // usually "localhost". If it's different for your server then your hosting provider should be able to tell you that.
        var $user = 'the_db_username';
        var $db = 'the_databasename';
        var $password = 'the_db_password';
        var $live_site = ''; // is usually empty.
Joomla will work, even if $log_path and $tmp_path are wrong, though you won't be able to install extensions. Login into the back-end of your new Joomla site.
In Joomla 1.5 goto: Help > System Info > Directory Permissions. Look at the bottom 4 rows:
Cache Directory /var/www/example.com/cache/ Writable
Cache Directory /var/www/example.com/administrator/cache/ Writable
Log Directory ($log_path) /var/www/some/other/folder/example.com/logs/ Unwritable
Temp Directory ($tmp_path) /var/www/some/other/folder/example.com/ Unwritable
If the $log_path and $tmp_path are "Unwritable", you'll need to change the values in configuration.php.
Use the values of the "Cache Directory" without the "/cache/" part and change $log_path and $tmp_path to
   var $log_path = '/var/www/example.com/logs';
   var $tmp_path = '/var/www/example.com/tmp';
If the Directory Permissions show that $log_path and $tmp_path are "Writable", then you should be able to install extensions.

Copying a website using SSH command line (method for experienced users)

Copying the files using a compressed archive file method

Copying a large number of individual files using FTP can sometimes be unreliable. If you have command-line access to the both source and destination systems then you can create a compressed archive file containing all the files on the source system, then transfer that single file to the destination system where it can be decompressed.

Creating an archive file

On Unix-style systems (eg. Linux) you can use the gzip program to create .zip files, or the tar program to create .tar.gz or .tar.bz2 files. For detailed instructions type man gzip or man tar at the command line. For example,
tar cvfz joomlabackup.tar.gz /path-to-joomla
will create a gzip-compressed archive file, called joomlabackup.tar.gz, containing all of the files in your Joomla! installation.
Important note! You need to make sure you are NOT in the folder you are trying to backup when you run the tar command or you will create an endless loop.

Extracting an archive file

Having copied the archive file to the destination system, you now need to unpack it. Use the equivalent command that you used to create the archive file. For example, to unpack the archive file created in the example above, enter
cd /path-to-joomla
tar xvfz joomlabackup.tar.gz
If the user or group IDs are not the same between the source and destination systems, then you will need to amend the ownership of the files you just extracted. For example, on an Apache system, you might need to enter the command
cd /path-to-joomla
chown -R www-group.www-user *
so that Apache has ownership of the Joomla! files.
Please ask your hosting provider for the correct group and user names, www-group and www-user, on your system.


Copying the database with MySQL command line method

Usually you run mysqldump to create a database copy:
$ mysqldump -u user -p db-name > db-name.out
Copy db-name.out file using sftp/ssh to remote MySQL server:
$ scp db-name.out user@remote.box.com:/backup
Restore database at remote server (login over ssh):
$ mysql -u user -p db-name < db-name.out


Special Notes

Tools

Akeeba

  • Akeeba Backup produces a .jpa file
  • The .jpa file contains all the folders/files and database files.
  • The .jpa file also contains an installer
  • Kickstart.php (from Akeeba) unpacks the .jpa file
  • You then run the installer and install your site like a Joomla install.
  • The installer changes the configuration for restoring to a different location and prompts for the new database details.
After you create the Database for your Joomla download and install Akeeba, it can be download from Joomla extension directory. There is a link to full instructions there as well.

GoDaddy.com Migrations

If using GoDaddy.com, different steps are required for import to be successful. In the Database section of the hosting control panel, find the database you wish to export and click the "edit details" icon (the little pencil). From there you will see a toolbar menu at the top with the option to Backup the database. Select that option and backup the SQL database to a _db_backups folder.
To import, go to the new hosting panel (if still using Go Daddy)and navigate to the new database you are importing to, following the same steps for export. This time, click on Restore in the menu and select the previously backed up database. After a few minutes, your database will be as good as before.


Source:
http://docs.joomla.org/Copying_a_Joomla_website

How do you put a module inside an article? Jump to: navigation, search

You will usually want to associate modules with articles in some way. The modules are allocated to module positions and the module positions appear somewhere on the Web page as determined by the template. However, it is sometimes useful to have a module actually embedded within the article.
To insert a module inside an article, use the {loadposition xx} command, as follows:
  1. Create a module and set its position to any value that doesn't conflict with an existing template position. You can type in the position value instead of selecting it from the drop-down list. For example, use the position myposition.
  2. Assign the module to the Menu Items that contain the articles that you want the module to show in. You can also just assign the module to all Menu Items. The module will not show unless you put the command to load the module in an article.
  3. Edit the articles where you want this module to appear and insert the text {loadposition myposition} in the article at the place where you want the module.


loadmodule

An alternative to "{loadposition xx}" is the "{loadmodule yyy}" variation which is handled by the same plugin.
In this case the plugin looks for the first module that who's type matches the string 'yyy'. So, you could load a "mod_login" module by placing {loadmodule login} in your text.

Modules within Modules

It is possible in Joomla! 2.5+ to include a module within a "Custom HTML" module as they are processed by content plugins in the same way as articles.
You should remember when doing this that you may experience formatting issues as the "chrome" of the "Custom HTML" module will surround the "chrome" of the included module potential having undesirable effects of the formatting or layout.


Sources:
http://docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F

Location of Error logs in a CPanel/WHM install

I was receiving a 500 internal server error on one of my CPanel sites earlier tonight but the apache error logs in CPanel admin for that user showed nothing. Instead, I had to locate the global apache error logs. This information may help others so I’ve listed some of the most useful CPanel/WHM log file locations below:

Apache Logs

General Error and Auditing Logs:
Location : /usr/local/apache/logs/error_log
Description : All exceptions caught by httpd along with standard error output from CGI applications are logged here..
The first place you should look when httpd crashes or you incur errors when accessing website.
Domain Access Logs:
Location : /usr/local/apache/domlogs/domain.com
Description : General access log file for each domain configured with cPanel.
Apache Access Logs:
Location : /usr/local/apache/logs/access_log
Description : Complete web server access log records all requests processed by the server.

MySQL Logs

MySQL General Information and Errors:
Location : /var/lib/mysql/$(hostname).err
Description : This path could vary, but is generally located in /var/lib/mysql. Could also be located at /var/log/mysqld.log

Joomla Blank (White) Frontend Page

So, a couple of days ago, I got myself into this project where the previous developer have used Joomla as the platform for the whole website which had a store as well.
Everything was working just fine on the old server, however, the client wasn’t happy and wanted to move it to another hosting provider, and the trouble just began here.
Well, to make it shorter, the transfer went smoothly (or so we thought). We could login to the admin backend and everything was just fine, we could publish articles and delete old ones. All was perfect, BUT, the front end did not want to appear! That was it, just a blank Joomla home page, a blank white page, that’s it. We could login to the admin panel, but the Joomla frontend was always blank!
So, reading about this on the internet, we found many solutions, and after lots of trials and errors, we managed to solve this.
So, read on to see what was the cause of the problem.
1. (.htaccess) File
Though we have checked the file and it was completely fine, nothing could make sense of why this joomla blank white frontend was there. So, a simple solution, DELETE the .htaccess file. But, it might be wise to make a local copy of it first. Usually the file would be created by itself if it’s needed. Problem solved
2. Corrupted File(s)
Sometimes, joomla’s core files get corrupted or overwritten or deleted for whatever reason. If one of the core files is missing, chances are, you will have the blank page issue. To solve this, try to login to your joomla root folder through an FTP client. Find out what is your joomla version. (usually, this is located at /libraries/joomla/version.php). Look for the “Release” and take note of the version number. Once you have done this, head to joomla’s official website and download a fresh copy of the same version you have. All versions will be available in joomla’s archive. Now, unzip the downloaded files and transfer them through FTP to your joomla root folder and accept all replacements.
Note: it’s always a good idea to keep a backup before you do this. Note that this will not affect your existing content. However, it will affect your themes if you have modified any of the original themes that come with the fresh joomla pack.
3. Directory Structures
If you have migrated your joomla website from one server to another, chances are, there might be something extra you need to do in order to get it running aside from transferring the files and importing the database. Different servers use different files structures. While this will not be an issue for joomla’s core components, it might be an issue for third part components and plugins. So, to solve this, make sure your plugins and components point to the correct directories after a hosting transfer and that might actually solve your issue.
4. PHP Related Errors
Another error could be caused by wrong or deprecated PHP codes in joomla’s modules, plugins, or components (third party ones). To debug these errors, enable the debugging mode under the Global Configuration in joomla’s administration backend. Now, visit your website and see what errors does it display and act accordingly to fix those errors.
5. Error Logs (Contributed by Afroz)
This solution was suggested by Afroz in the comments section. Try to check the Error logs under your website control panel and see if that will give you any heads up.
I guess that is it for now!
Have a great time, and if you found this useful, perhaps you could share it with your friends.
If you yourself have had any experience with a blank screen with Joomla and you managed to solve it, maybe you could just drop us a line in here and share with us how did you manage to solve it.


Source:
http://itscoding.com/joomla-blank-white-frontend-page

A Guided Tour of Joomla's configuration.php File

In our forum we are often asked to help with problems with paths, passwords, data base connections and other basic configuration issues. This is especially true after a migration or move of a site.
Most of the fixes for these problems can be made in your configuration.php file. We're going to help you get to know it this very important file.
In this lesson, were going to tell you:
  • Where you can locate your configuration.php file.
  • What each line affects and common settings.
This is not a comprehensive coding guide, but is a general reference to help you understand this file.

Location of the configuration.php file

tutuploadsLocation.png
Here's a picture of the location using Filezilla. This installation is in a sub directory called "joomla" .
Your configuration.php file is located in the root of your joomla installation. If it's in the main directory the path to it would look something like this:
  • /home/username/public_html/configuration.php
In a sub directory or sub domain:
  • /home/username/public_html/subdirectory/configuration.php
On your computer (using XAMPP as an example)
  • C:\Documents and Settings\Ed\My Documents\xampp\htdocs\J17\configuration.php
I shouldn't have to say this, but I will. Make a backup of your current file before you do anything to it. Use a test site or play with it in a text editor offline for practice. Don't make changes without a backup. Make a backup before you move a file to a different server or directory.
We'll go through the file line-by-line and create a quick reference for each line, with some notes where further explanation might be needed.

Site Settings

tutuploadsSite_Settings.png
  • $offline : When set to "0" the site is online. Set to "1" the site is offline
  • $offline_message : You can write any text message on this line.
  • $sitename : The name of the site as it appears in headings
  • $editor : The editor that is chosen as default in global configuration
  • $list_limit :The length of lists in the Control Panel for all Users. By default, this is set to 20.
  • $access : The default access level to the site. "1" is public access; "2" is registered; "3" is special

Debug Settings

tutuploadsDebug_Settings.png
  • $debug : "0" is off. "1" is on.
  • $debug_lang : "0" is off. "1" is on.
Notes:
$debug : This will turn on the debugging system of Joomla!. When set to Yes, this tool will provide diagnostic information, language translations, and SQL errors. If any such issues or errors occur, they will be displayed at the bottom of each page, in both the front-end and back-end.
$debug_lang : This will turn on the debugging indicators (*...*) or (?...?) for the Joomla! Language files. Debug Language will work without the Debug System tool set to on. But it will not provide additional detailed references which would help in correcting any errors.

Database Settings

tutuploadsData_Base_Settings.png
  • $dbtype : "mysqli" or "mysql"
  • $host : "localhost" on many servers, not all.
  • $user : The name of the data base user that has access to the data base.
  • $password : The password associated with the data base user. Not your admin password or FTP password.
  • $db : The data base name created when you created the data base.
  • $dbprefix : At least three characters ending in an underscore. (Set when you installed joomla)
Notes
You need this information when you install the site. Forgetting to change this is often the cause of problems when moving a site. Before moving any site, make a backup copy of configuration.php so you can refer to the original settings if you need them.
$dbtype : only change this if you have changed servers and using a different type.
$host : most servers this is localhost. Godaddy and a some others have different names. Check with your hosting company if you're not sure.
$user : On shared cPanel servers it is often prefixed with the user name - for example edandrea_ed. On your local machine there will not be a prefix unless you created one. It shouldn't be root in any case. If you create a site on your local server and don't specify password when you create a data base, you will be able to access the data without a password. This is not secure when you move to web server online.
$db : On shared cPanel servers this is usually prefixed with a username - for example edandrea_jml1. On your local machine there will not be a prefix unless you created one. On Godaddy servers this name is generated by their service and you will not be able to create your own, see their documentation if you need it.
$dbprefix : You cannot create a new one here. This must be the one that was used when the data base was created, or that is actually used by the database. If you have more than one data base prefix, you can change this, but you can't create a new one.

Assorted extra features

tutuploadsmedia_1323186823566.png
$live_site : The actual URL of the site for example - http://yourdomain.com (unless your site is in a subdirectory)
$secret: : DO NOT CHANGE
$gzip : "0" is off; "1" is on.
$error_reporting : "-1" is the appropriate level.
$helpurl : default is joomla help. Can be set to your own help pages.

Notes
$live_site : In the newest versions this should not have a value. There may be times you do need to fill in a value. If you are redirecting a url you need to put the actual url to the live site on this line. Or if you are creating a copy of a site for testing and modification. For example, I have a test site at http://dashhelp.com/joomla17 which is a copy of my main site. had to change this to line in the configuratiion.php file on the copy. You will get a page not found error if this is not set to 'http://yourdomain.com/directory" or in the case of a subdomain "http://subdomain.yourdomain.com" Joomla uses this url to create relative paths. Essential to check this on test sites.
$secret : This is generated when Joomla! is first installed and is not changeable. It is used internally by Joomla! for security purposes.
$error_reporting : This sets the appropriate level of reporting. The default setting is System Default. Errors can occur that don't have any effect on the site. You don't need to log all errors unless you're doing some detailed debugging work. Your logs will just eat up your disk space otherwise.
$helpurl : The place Joomla! looks for help information when you click the Help button (visible in many screens and options of the administration panel). By default, it uses Joomla!'s main help site, but you could create your own help site, or link people to your ticket system for help.
tutuploadsmedia_1323192679184.png
$ftp_host: : "127.0.0.1" is the default IP for localhost. Your server may be different.
$ftp_port : "21" is normal default. Check with your host if you are having problems. Not all servers are the same.
$ftp_user : your FTP user name
$ftp_pass : your FTP password
$ftp_root: : usually a path like /home/username/public_html (no trailing slash)
$ftp_enable : This setting tells Joomla! to use it's built-in FTP function instead of the process used by PHP.

Time Zone Settings

tutuploadsLocale__Time_Zone__Settings.png
$offset : default is UTC
$offset_user : default is UTC
Notes
$offset. This tool sets the current date and time. The set time should be where the site's server is located. The default setting is (UTC 00:00) Western Europe Time, London, Lisbon, Casablanca.Here's an example of the offset if the server is in California - US Pacific time $offset = 'America/Los_Angeles';

Email Settings

tutuploadsEmail_Settings.png
$mailer : "mail" uses the PHP mail function; "sendmail" uses SMTP mail on the server.
$mailfrom : From E-mail. The email address used by Joomla! to send site email.
$sendmail : The path where the Sendmail program is located. This path is only used if Mailer is set to Sendmail.
$smtpauth : If the SMTP server requires authentication to send mail, set this to Yes. Otherwise leave it at No. This is only used if Mailer is set to Sendmail.
$smtpuser : The username to use for access to the SMTP host. This is only used if Mailer is set to Sendmail.
$smtppass: The password to use for access to the SMTP host. This is only used if Mailer is set to Sendmail.
$smtphost : SMTP Host. The SMTP address to use when sending mail. This is only used if Mailer is set to Sendmail.
$smtpsecure : Select the security model your SMTP server uses - Default is None. Options are SSL and TTL.
$smtpport : SMTP Port. Most unsecured servers use port 25 and most secure servers use port 465. Check with your host.

Log Settings

tutuploadsmedia_1323186985799.png
$log_path : '//home/username/public_html/j/logs';
$tmp_path : :'//home/username\public_html/tmp';
Notes

$log_path : The path where the logs should be stored. The Joomla! installer should automatically fill in this folder. It's not critical to the operation of the site, so if it's wrong you will only know it if you try to check the logs.
$tmp_path : This is an important setting and should be filled in properly. Many problems found when moving sites are caused because joomla is looking for the old tmp folder. If you get any errors regarding the tmp folder check this path and make sure it's correct..

Cache Settings

tutuploadsCache_Settings.png
$caching : "0" is off; "1" Conservative setting; "2" Progressive Setting
$cache_handler : "file" full cacheing ; "cachelite" lite cacheing
Notes
$caching : This setting sets the maximum length of time (in minutes) for a cache file to be stored before it is refreshed. The default setting is 15 minutes.
$cache_handler : This setting sets how the cache operates. There is only one caching mechanism which is file-based.
Cachelite is an alternative to full caching.

Metadata Settings

tutuploadsMeta_Data_Settings.png
$MetaDesc : Create a text description for SEO.
$MetaKeys : Insert keywords separated by a comma.
$MetaAuthor : "0" is no; "1" is yes.
Notes
$MetaDesc : This is the Site Meta Description. This is the description of the site which is indexed by search engine spiders.
$MetaKeys : These are Site Meta Keywords. These keywords describe the site and are the basis for improving the ability of search engine spiders ability to index the site.
$MetaAuthor : This shows Author Meta Tag. It shows the Author Meta information for articles and is used by search engine spiders when indexing the site.

SEO Settings (Search Engine Optimization)

tutuploadsSEO_Settings__Search_Engine_Optimization_.png
$sef : "0: is no; "1" is yes
$sef_rewrite : "0" is no; "1" is yes
$sef_suffix : "0" is no; "1" is yes
$unicodeslugs : "0" is no; "1" is yes
$feed_limit : default is 10 - any integer can be used
Notes

$sef : This controls Search Engine Friendly URLs. When set to Yes, URLs are rewritten to be more friendly for search engine spiders. For example, the URL: www.example.com/index.php?option=com_content&view=etc..., would turn into: www.example.com/alias. Most of the items created in Joomla! have an Alias box where a search engine friendly URL can be inserted. The default setting is No.
$sef_rewrite : When set to Yes, Joomla! will use the mod_rewrite settings of Apache when creating search engine friendly URLs. Please note: it is advised that you do not modify any .htaccess file without an understanding of how it works. You must use the .htaccess file provided with Joomla! in order to use this setting. To use this file, rename the htaccess.txt file (found in the root directory) to .htaccess. By default, this setting is set to No.
$sef_suffix : When set to Yes, Joomla! will add .html to the end of the URLs. The default setting is No.
$unicodeslugs : Choose between transliteration and unicode aliases. Transliteration is default. This is an advanced setting and you probably will not need to change this unless you are and SEO expert.

Session Settings

tutuploadsSession_Settings.png
$lifetime : a whole number indicating minutes.
$session_handler : "database" or "none"
Notes

$lifetime : This setting sets how long a session should last and how long a user can remain signed in for (before logging them off for being inactive). The default setting is 15 minutes.
$session_handler : This setting sets how the session should be handled once a user connects and logs into the site. The default setting is set to Database.


source:
http://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/

Monday, June 3, 2013

How to remove branding into joomla template.

How to remove branding into joomla template.
--------------------------------------------
1..Install quickstart joomla template
2..Remove template from Extension/manager.

you will also find a standalone template in package now we shall use it.

just follow the following steps.

1. extract the stand alone template folder
2. open stand alone template in dreamweaver
3. Rename template folder as you like
4. Rename template name in templateDetails.xml
5. search and replace the template name in sourecode with your new template name.
6. also search the old template name into database with supper text search.
7. Install this as new template (standard installation).
8. make this template as default.

all module associated with it should work.

Best way to making new Custom HTML module in Joomla

In any standard joomla template you should see typography section where you can find many
css examples i.e buttons style, table style, heading style and code for useing these styles.

you can use these css style and make your work fast that will also match your current template theme.

1..configure your site with dreamweaver
2..make new HTML document
3..attached template.css or typography.css into this document.
4..use code that describe in typography section of template.

make desirable changes and you can flow with current theme of template.

Now just copy this code and paste into new custom HTML module of joomla.

Thursday, April 18, 2013

How to Hide Selected K2 Extra Fields from the front end?

K2 component (getk2.org) for Joomla 2.5 and Joomla 3.0 is still a very useful extension. K2 was built as a complete replacement of the default article system in Joomla! but many people use it in a surprising way, like the people's profiles in the online Marriage Agency.
K2 can keep the information in articles about thousands of women/men of different age, appearance and occupation. For personal characteristics you can use K2 Extra Fields so you and your users will be able to sort people according to certain characteristics (age, eye color), like the products in the store.
Sometimes you might want to hide the selected custom fields, but only the front view of the article. And then what? Unfortunately, component K2 did not foresee such a possibility. If anyone is a programmer can modify the code, but I wanted to use a simple solution, non-invasive method.

CSS Pseudo-classes  Can Help You with K2 Extra Fields

Depending on which field you want to hide in order to select one of the solutions:
  • :first-child - this pseudo-class matches an element only if it's the first child element of its parent element.
  • :nth-child(N) - matches elements on the basis of their positions within a parent element’s list of child elements.
  • :nth-last-child(N) - matches elements on the basis of their positions within a parent element’s list of child elements.

Now edit your template.css file or K2.css file and add only one line of CSS code at the bottom:

div.itemExtraFields ul li:first-child { display:none; }


It will hide first element of list, in our case, the first field.
This example selector will match the first three rows of Extra Field list:

div.itemExtraFields ul li:nth-child(-n+3) { display:none; }

This solution has "only one" defect - browser support - this pseudo-classes are currently not supported in Internet Explorer 8 and in older versions.

Tuesday, April 2, 2013

Import a large MySQL database over SSH

By default, most PHP uploaders limit the import file size of a MySQL database to 50MB. You may not always be able to change the limit yourself (depending upon your host) so the alternative way to import the database is to use SSH.

Start by uploading the .sql file onto the server using your regular FTP/FTPS/SFTP client.
Log into the server using SSH and navigate to the directory where your .sql file is.
Run this command:
mysql -p -u username database_name < file.sql
Notes:
The -p will prompt for your database password.
Replace username, database and file.sql with their appropriate values.
--------------------------------------------------------------------------------

If you are accessing via cPanel root use following command :
root $: cd /home
root $: ls
root $: cd /home/username of domain


Monday, April 1, 2013

How to Add ReCaptcha in K2 Joomla

The new version of Joomla - 2.5 has a captcha form element built in - which is great.  However, if you install K2 (2.5.6) this also uses the same ReCaptcha element.  Unless you get the settings just right the two will conflict in strange ways.  In order for the system to work you need to
  1. Disable the Captcha -ReCaptcha component in the Joomla Comonent Manager
  2. Go to the User Manager and then to the Options (Users Configuration) and set Captcha to be "none selected"
  3. Go to the K2 configuration and enable Captcha and enter your public and private keys.
If you don't do this, then both captcha's will be used but only one will be displayed (the K2 one I think) and you will get error messages similar to this:
"The words you typed did not match the ones displayed. Please try again."
Or if you disable just the K2 Captcha then you get this error message:
Empty solution not allowed.


 -------------------------------------------------------------------------------------------------


I have resolved the problem
You don't have to disable anything, just to get the Captcha - ReCaptcha plugin working on K2 comment you have to follow these steps:

1 - ON www.google.com/recaptcha Go to
- USE reCAPTCHA ON YOUR SITE
- ADD Gmail account if you don't have, or log in if you have.
- Go MY ACCOUNT -> + Add a New Site
- Create a reCAPTCHA key -> ADD your Domain -> Create a Key.
- Copy (Public Key and then you will copy the Private Key)

2 - On your admin panel go to:
- Component -> K2 -> Parameters -> Comments-> Active reCaptcha -> Yes.
- Go to Component -> K2 -> Parameters -> Advanced -> Anti-spam.
- Past the two Key that you have from Google. (Public and Private Key)
-> Refresh you site and you got it ^_^

IF YOU STILL DON'T HAVE THE CAPTCHA WORKING:
Make sure you have enabled the K2 plugin and Comments on the Category options.
That should be resolving your problem.

- IF, IF that is still not working:
- Go to your site
- Click " F12 " on Google Chrom / Control+F12 (Firebugs, Firefox)
- Refresh your web site
- If you have a JavaScript errors try to find what is your problems and solutions.
- Last thing if you don't have any JS problem, You should re-install joomla xD

That is all


If there is still problem do following step:
----------------------------------------
Hi there; it seems jQuery is not well loaded in your site.
Do the following:
1. Go to plugin, and ensure that K2 system plugin is enabled (i.e on the back end, go to Extensions, select plugin manager, check out k2 system plugin and ensure it is enabled).
2. Ensure that you setup correctly the jQuery handling options under K2 parameters. All you need to do is go to admin back end, click under components, go to K2 component. Once it is, click on k2 parameters. Check under 'layout & views'. Check jQuery library handling; set it to load v.1.8.2 local; also do the same under Backend jQuery & jQuery UI handling; set it to local copy.

Ensure your k2 comments are enabled and alas, everything will work.

IF THE ABOVE FAILS -- I AM DEAD SURE IT WONT; DO THE FOLLOWING:

Make sure that there is no other javascript error on your page preventing reCAPTCHA from operating. Have in mind that you only need one copy of jQuery on your site. K2 namespaces jQuery with $K2.

Instead of the following:

$(document).ready ....

You can use the following:

$K2(document).ready ....




Cheers!

Friday, March 29, 2013

Move Virtual Box Virtual Machines to New Server/Location

Step 1: Locate and move the Virtual Machine
You will be looking for a .vdi file. The location of this file will depend upon the host platform. On Linux host, the file will be found in ~/VirtualBox VMs.

On Mac Host, the file will be found in Go>Home>VirtualBox VMs

Within that directory, you will find sub-directories of all your virtual machines. Within the virtual machine directory in question, you will find the .vdi file — that is, the file that must be moved to the new host. Copy that file to an external or shared drive and then copy it onto the new host (the location doesn’t matter).


Step 2: Create a new virtual machine
The process of creating the new virtual machine will be the same as if you were creating a standard virtual machine until you get to the Virtual Hard Disk creation screen (Figure-1). You will select Use Existing Hard Disk, click the folder icon, navigate to the newly copied .vdi file, select the file in question, and then click Next.



Step 3: Copy All MAC addressess
When you move your VM to new location it is good to copy your network card MAC address from Old Virtual Box and past into new Virtual Box virtual machine, For doing this you will not face any complicated network connectivity issue after starting your machine.

Follow the step below:

1..Select newly created Virtual machine in virtual box.
2..Click on setting
3..Click on Network
4..Delete existing MAC address and Past the same mac address as it was in old Virtual Box VM.
5..Do it with all network Cards.
6..Also make same setting for network like "NAT or Bridge" etc.


------------------------------------------------------------------------------------------------------


Since your mac address have changed you no longer have an interface called eth0, this name is reserved for an interface with the "old" mac-address. The "new" interface should have the next free name (eg. ethN).


To see all the interfaces on the machine you can use this command:

ifconfig -a

If you want to reset the name reservations for network interfaces you can remove the file

/etc/udev/rules.d/70-persistent-net.rules

and restart the machine (or remove/insert the device, though this is not possible in this case).

Alternatively you can change the interface-name that you have configured to what ever the new one is called by changing all occurences of the old name with the new one in the file


/etc/network/interfaces

Saturday, March 23, 2013

How to mount Folder into the folder from another Drive folder in Windows 7

A symbolic link is a reference to another file or folder on your drive. Symbolic links or short symlinks are originally a linux-only feature, but since 2000 Windows supports them too. The difference between symbolic links and junction points is that a symbolic link can also point to a file or remote SMB network path (which means that you can also create cross-system symlinks, which could come in handy in a network if you don’t want to copy all of the files). Let’s say you want to launch a game or application from another PC, normally, you’d have to copy it to your own PC, but with symlinks you can launch it as long as you are connected to the other PC.

 Create & Remove Junction Points in Windows 7

Download Junction v1.05 for Windows
Copy it somewhere e.g. to \windows\system32\
You can then create junction points via the command line:
CD: C:\Windows\system32
junction.exe “c:\new folder” “d:\path\real folder”
Remove junction points:
junction.exe -d “c:\new folder”




Friday, March 22, 2013

How do you mount a directory as a drive in Windows 7?

How do you mount a directory as a drive in Windows 7?
---------------------------------------------------------
If you have touched DOS before, you might still remember what this old school command subst

is all about. It is a command used for substituting local paths on physical and logical

drives, known as virtual drives. For example, if you want to have a logical drive N: mapped

to a local folder on your computer, say c:\temp, you can simply use the following command to

make it.

    subst N: c:\temp

If you want to have it permanent, there is a really nasty and hidden trick, creating a new

key in the registry.

You have to go to

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices

and there create a key named with the drive letter you want, colon included
(N: in our example) and with this value:

\??\c:\\windows


you can obviously change c: and windows for whatever folder you want, but remember to double the backslash after the unit letter, because it won’t work with a single backslash.
Reboot and enjoy your new N: :)

To Delete the subst drive

subst X: /d


TIP:
There is also a great freeware utility called Visual Subst to make things even easier:












How do you mount a directory as a drive in Windows 7?

How do you mount a directory as a drive in Windows 7?
---------------------------------------------------------
If you have touched DOS before, you might still remember what this old school command subst

is all about. It is a command used for substituting local paths on physical and logical

drives, known as virtual drives. For example, if you want to have a logical drive N: mapped

to a local folder on your computer, say c:\temp, you can simply use the following command to

make it.

    subst N: c:\temp

If you want to have it permanent, there is a really nasty and hidden trick, creating a new

key in the registry.

You have to go to

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices

and there create a key named with the drive letter you want, colon included
(N: in our example) and with this value:

\??\c:\\windows


you can obviously change c: and windows for whatever folder you want, but remember to double the backslash after the unit letter, because it won’t work with a single backslash.
Reboot and enjoy your new N: :)

To Delete the subst drive

subst X: /d


TIP:
There is also a great freeware utility called Visual Subst to make things even easier:












HOW TO SHARE EXTERNAL HARD DRIVE FROM MAC OS X TO LINUX UBUNTU

IN MAC
---------
To Enable file sharing:
-----------------------
1..From the Apple drop-down list, select System Preferences....
2..Click the Sharing icon.
3..In Mac OS X select 10.4 select the Services tab.
4..Check on "File Sharing" and "Remote Log in"
5..When finished, close the Sharing window.

To check Username (administrator) of External Drive
----------------------------------------------------
1..Right Click on External Exp drive
2..Click on Get info
3..Click Under the Sharing and Permission
(Note supper username for this External hard drive that is usually your admin and password)


IN UBUNTU
--------------
1..$sudo apt-get install sshfs
2..Go to Places and click "Connect to Server"
3..From the "Type" select ssh
4..in the Server put IP of your remote server
5..in the user detail put username and password of the remote server
6..Click connect
7..Done

NOW YOU CAN BROWS/COPY/PAST THE WHOLE REMOTE COMPUTER AND ITS DRIVES AS YOU CAN IN UBUNTU.

Sunday, February 10, 2013

How to Migrate Magento Products into K2 Items (Joomla)

Whenever we need to transfer any database from one program to another program, we just need to study the Targeted program Tables (schema) then we have to transform our data according to targeted tables (schema) by following this approach we can transfer any data into any program as I have done with
Magento to K2 joomla transfer.


How to Migrate Magento Products into to K2 Items (Joomla)
-------------------------------------------------------------------

1..Go into joomla database from phpmyadmin and open k2_items table and see how many field are there.
 
2..Make an excel file and type all field name into columns.

3..paste at least one record for all fields from phpmyadmin (so you will be able to examine the   

recording format.)

4..you may have to make extra filed in K2 to match you data fields in magento.
  
3..Export all Product from Magento back-end panel from Export.
   (if your database is too big so you can partially export products then
    import all in excel)

4..sort all your magento product in excel by using filter and delete unnecessary columns.

5..Now we need to prepare our k2_items tables.
(MS Excel filter is the best tool for transforming data that I use mostly)


(in K2_items records you will see that extra fields records are enter in "one" field with code

[{"id":"16","value":""},{"id":"17","value":"1"},{"id":"19","value":"3137 Lorna Rd"},

{"id":"20","value":"Birmingham"},{"id":"21","value":"35216"},{"id":"22","value":"1"},

{"id":"23","value":"(205) 822 8224"},{"id":"24","value":""},{"id":"25","value":""}]    


the above mention code filed name are as below for example: (your field name will be different)

Contact Person: [{"id":"16","value":"Rameez"},
State:         {"id":"17","value":"29"},            (this is drop down list 29 is for Hawaii)
Address :    {"id":"19","value":"230 Highway 34"},
City:        {"id":"20","value":"Aberdeen"},
Zip Code:    {"id":"21","value":"07747"},
Country:    {"id":"22","value":"1"},
Phone1:        {"id":"23","value":"732-290-1900"},
Phone2:     {"id":"24","value":"732-290-1901"},
Email:        {"id":"25","value":"rameez@aol.com"}]
(you can see the IDs and name of extra field from the record easily by K2 Items in backed)


So you will have to make this code by using excel merge columns technique as follows)

    Merge columns of data without spaces between the data: =A1&B1&C1&…
    Merge columns of data with spaces between the data: =A1&" "&B1&" "&C1&…

see following link for a better understanding
http://www.extendoffice.com/documents/excel/510-merge-columns-keep-data.html


6..copy and paste all Magento product filed into corresponding filed of K2 accordingly.

7..copy and paste all others default values of k2 into k2_items columns in each record.

8..save as this excel file into csv format.


9..Now import this file into a k2_items table by using phpmyadmin panel.


Troubleshooting:
--------------------
If you found any error importing csv file into phpmyadmin
THEN save excel file into sql format AND import it again.


the above mention approach is applicable for all manually transfer of databases
From any program to any program.