Tuesday, September 1, 2009

Magento 5 Common Errors and Solutions.


Five Common Errors in Magento. Tweak your application for better performance

INTRODUCTION



Magento is an Ecommerce platform built for open-source technology.It is build on zend frame work.While using MAGENTO you face very common errors for example installation errors or Magento cannot login to the admin etc. which may create problems in application. Here are five common errors and their solutions

Error 404 after installation of sample data (while home page is OK)

solution:

You will need to do one of two things:

  1. Refresh catalog rewrites - Admin > System > Cache > Refresh catalog rewrites. If this doesn’t work then >

  2. Turn off URL Rewrites - Admin > System > Web > SEO > NO


When you go the Magento Connect Manager in your Admin Panel, you may get the following error message:

Error: Please check for sufficient write file permissions

solution:-

Magento Connect requires write permissions to the Magento files in order to install new extensions or upgrade the software to a new version. You can change your file/folder permissions either thru your FTP Client (like FileZilla) OR thru a SSH client (like Putty).

Go inside your Magento folder & change permissions of ALL FILES & FOLDERS RECURSIVELY to "777".

Here's how to do this thru your SSH client. Log in to your SSH account and then execute the following commands:

cd
find . -type d -exec chmod 777 {} \;
chmod 666 downloader/config.ini

You should now be able to access the Magento Connect Manager. When you have finished the installation/upgrade, you should reset the permissions by executing the following SSH commands:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod o+w var media app/etc/use_cache.ser

Magento error — Notice: Undefined index: 0 in app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

Solution:-


This will most likely occur when migrating Magento from one host to another. The fix, while not so obvious and easy t find turned out to be quite easy ;) During the installation, Magento sets two IDs to 0 in its database. However, when importing the database dump to your new host, MySQL doesn’t like this and changes these ID’s to 2, which of course is not what Magento needs to load, thus the error. The fix is quite easy — set these IDs back to 0.

The IDs, we need are for ‘admin’ in the tables:

* core_store
* core_website

Just open phpMyAdmin and change 2 to 0, clear Magento’s cache by deleting the contents of the /var/cache folder and Voila!

Also, it will be a good idea to check the box for “Disable foreign key checks”, when exporting it in the firt place, as you will surely receive an error for this when importing ;)

Mgento commerce: object not found:-

solution:-

If you just installed Magento and receive an “Object Not Found” 404 error with ever link you click, it’s because mod_rewrite is not enabled on your server. Tell your hosting provider to turn it on if you’re on shared hosting. If you’re using XAMPP,

By default mod_rewrite module is not enabled in apache with XAMPP.

To enable mod_rewrite in xampp first go to the directory of installation \apache\conf and edit httpd.conf. Find the line that contains
#LoadModule rewrite_module modules/mod_rewrite.so
uncomment this(should be):

LoadModule rewrite_module modules/mod_rewrite.so

Also find AllowOverride None

Should be:

AllowOverride All

AllowOverride appears 2 or 3 times on the configuration file. Change all of them.

Magento cannot Login to the admin:-

solution:-

The solution is to add the following line to your hosts file so you can access your localhost as www.localhost.com.

C:Windows\System32\drivers\etc\hosts (edit this file in notepad)

127.0.0.1 magento.localhost.com www.localhost.com

Also worth mentioning, if you need to reset a password manually in the database use the following:

UPDATE admin_user SET password=MD5(‘mypassword’) WHERE username=‘admin’;

If none of the above works, install the browser Opera and use it. Opera seems to work out of the box whereas IE, Firefox, and Google Chrome do not.

1 comment:

  1. Great tips, worked perfect!
    Keep it up dude.
    Cheers,
    Neerav

    ReplyDelete

All rights are reserved. Nobleatom.com
Software Development Services.
Contact me: khubabmazhar596@hotmail.com

Web Design Increase Page Rank Internet blogs DigNow.net web directory1Abc DirectorySeo friendly web directory