Aario's blog about life and technology

Archive for February, 2014

Move a magento server – Why my magento server redirects me to localhost?

In my case I installed a magento on my localhost on /var/www/magento to be accessible trough

After a while I just decided to access my site from another computer on my local network. So this time I entered (IP of my first computer with magento installed locally). It quickly redirected me to localhost/magento!

To fix that I entered the database on my first computer and entered:

update core_config_data set value=’’ where value=’http://localhost/magento/’;

Remember two things:

  1. The new address must end with a slash character ‘/’ or you gonna see an ugly white theme on your site!
  2. If you are moving your magento to a new server with completely different configuration, you need to open your <magento installation path>/app/etc/local.xml file and edit the <connection> tag to modify database connection settings (i.e. username, password).

Hope it helps!


Solved Debian Wheezy wlan “deauthenticating by local choice” error

Living in Iran with an Islamic regime who follows former soviet union strategies in almost all sort of policies, access to ADSL internet is a rare and time consuming process and in some regions of the country is almost impossible! It’s one year since I moved to my new apartment an I still don’t have ADSL access. Last week decided to sue the manager of local public communication bureau of not letting people of the republic have access to ADSL internet! But in the last minute, they said we have one ADSL coupon freed today. Do you want to use it to subscribe for your home Internet?!

They’re supposed to connect my internet within a week but meanwhile I decided to clean-up my ADSL modem after a year and to connect my laptop WLAN to it and I faced:

[ 1005.872116] wlan0: no IPv6 routers present

And after a while:

[ 1049.628263] wlan0: deauthenticating from 54:e6:fc:a5:74:49 by local choice (reason=3)

The kde network manager icon shows “Setting network address…” for a while and then it just disconnects. Searched trough internet using my expensive and slow 3G mobile network for a while. Skipped all weblog posts which are globally censored by the government, and in here found that the solution is to:

open /etc/default/grub as root and in an editor. i.e. in KDE:

Press Alt+F2
Run kdesu kate /etc/default/grub

in opened text file replace below:


With below:

GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1 quiet”

Then run in command line:

sudo update-grub

And then reboot your system. It will update the grub boot loader with a new option to disable ipv6 on boot. As far as I investigated, there’s a bug inside software bundled with debian wheezy which makes dhcp client slow on wifi when ipv6 is not present on modem/router. So dhcp connection times out and wifi disconnects by “local choice”. You can increase this time limit or simply disable ipv6 as I described above and it should solve the problem.