First time When I was start working on the Magento, I have installed Magento on my local system and installation process has been completed successfully. I faced one very strange problem after fresh installation, I can not logged in Admin section. After searching in Magento commumity, finally I found the solution, here is the steps to get rid of such kind of the problem.


First Solution


Replace the http://localhost/magento/index.php/admin from the i.p. address of the localhost then it will look like as I made it work into whenever I changed my browser. Suppose I installed magento using google chrome browser and I open admin url into my firefox window and it worked. Though in the firefox the url http://localhost/magento/index.php/admin did not work, but url worked fine.


Second Solution


Go to your Magento Installation directory and navigate to the app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file.


Find the code:



and replace with



After this save the file and I think it will work now.