Top 10 magento trouble shooting after transferring to a new server


1. Make sure there is nothing in the cache directory in new location of magento:
Execute the following command from inside magento root directory,

rm -rf var/*

2. Set proper folder permissions:
Enter the following commands one by one,

chmod o+w var var/.htaccess app/etc
chmod -R o+w media

Also make sure all folder permissions are set to 755 and file permissions to 644

3. Site is loading till the header part only, No other content below it:
Install GD Library

sudo apt-get install php5-gd

4. Admin panel not working after logging in:
Install CURL extension

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

5. SEO friendly URL not working:
Install/enable rewrite module on Apache,

sudo a2enmod rewrite

6. Ajax [Add to Cart] pop up not showing on product detail page:
Turn [Merge Javascript] option to, “No” from magento admin panel.

7. Admin panel showing message for miss configuration of server:
A. Checkout whether .htaccess is being considered properly or not, also make sure any apache module specific command that is in that file is working. Check whether those modules are installed/enabled in the server.
B. Add/Update virtual host OR apache configuration file to allow over ridding by putting this line

AllowOverride All

8. Crontab is working but price rules are resetting:
Empty the [cron_schedule] table from the database to remove all dead locked and garbaged schedules. Don’t worry, this table will populate data again according to new cron schedules.

9. Changed main domain OR site address?:
Access the table [core_config_data] and edit two fields [web/unsecure/base_url] [web/secure/base_url] under the [path] column to the new domain/web address.

10. Want to reset admin password?:
Run the query from inside new server after connecting to mySQL,

UPDATE admin_user SET password=CONCAT(MD5('NEWPASS'), ':NE') WHERE username='ADMINUSERNAME';

Change NEWPASS, NE, ADMINUSERNAME to your wish.

How to Set Up Virtual Host with MAMP on a Mac OSX


1. Update the hosts file:
We are going to add an example domain named “” as a virtual host through this tutorial. Lets first add this in the “hosts” file by typing the following command on the Terminal,

sudo nano /etc/hosts

Then find the following line, localhost

update this to following, localhost

Also to add our domain to the IPv6 version find the following line somewhere bottom of the file,

fe80::1%lo0 localhost

update this line to the following one,

fe80::1%lo0 localhost

Finally press “ctrl+x” and then “y” to save and exit this file.

2. Update httpd.conf file
Open up this file by typing the following command,

sudo nano /Applications/MAMP/conf/apache/httpd.conf

find out the following line,

#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

It might have a “#” symbol at the very beginning of the line. Delete the symbol to activate this statement. If the line is not anywhere of the “httpd.conf” file then add the above line anywhere of this file. Now, save and exit this file.

3. Update httpd-vhosts.conf file
Now go into the “/Applications/MAMP/conf/apache/” folder by executing,

cd /Applications/MAMP/conf/apache/

If you can see a folder named “extra” then enter inside it otherwise create this “extra” folder and then enter inside it.
Now update (If there was already a “extra” folder then there should be a “httpd-vhosts.conf” file other wise just create the “httpd-vhosts.conf” file inside “extra” folder) the “httpd-vhosts.conf” file by typing the following,

sudo nano httpd-vhosts.conf

Then the final “httpd-vhosts.conf” file should have the following code block. Whether you add these lines or updated the existing file.

NameVirtualHost *:80

DocumentRoot "/Applications/MAMP/htdocs"

<VirtualHost *:80>
    DocumentRoot "/Applications/MAMP/htdocs/thisdayinbangladesh/public"
    <Directory "/Applications/MAMP/htdocs/thisdayinbangladesh/public">
        Options All
        AllowOverride All
        Order allow,deny
        Allow from all

Here “thisdayinbangladesh” is a project directory; actually a laravel4 project directory inside my “htdocs” folder and we added the “public” folder thats resides in “thisdayinbangladesh” folder as the document root cause laravel4 needs to point to the “public” folder as the application root URL.
In this stage of this example. You can forget about laravel4 and simply create the directory “/thisdayinbangladesh/public” inside your “htdocs” folder and place a simple “index.html” file there inside the “public” folder.

4. Restart:
Simply stop and re-start the Apache service from your MAMP control panel. Then try out the URL on your browser. You should see your “index.html” file!

This tutorial will take you through out a nice series of posts on which a full laravel4 web application has been developed. That service is already LIVE HERE. So, stay tuned!

The next tutorial is ready Installing Laravel4 in Mac OSX with MAMP. So, you are another step close toward the full laravel4 application development series.

To Do List After Launching a New Linux/Unix Like Server for Development


Commands, tricks & cautions that will be used here have been tested only on a Ubuntu 12.04 VPS. Though, most of the commands should work in other Unix like system without any change.
In this lesson we will see how should a newly launched/opened server be configured for basic security & proper accessibility. Usually you get an IP address & a root password for logging in as root, as soon as you open a new cloud/vps server from rackspace/digitalocean or some others like these.

1. Connecting to the remote system through/using SSH:
SSH(Secure Shell) is a protocol used to securely loggin in to a remote system & also ssh is the tool used in Linux that connect to the remote server over the SSH protocol.

ssh root@

The terminal will show a message and will prompt

Are you sure you want to continue connecting (yes/no)?

Type yes & press enter & then in next prompt enter your root password that was provided by that server provider while opening a VPS. So, now we are logged in to the remote system as root user.

2. Change your root user’s password:
You used the root password that was generated & provided by the server provider & the first thing is to change this password. Enter the following command on the terminal.


It will first ask the current root password & after entering the current password it will ask your desired new password twice for confirmation. Continue reading