how to fix the missing admin page of magento.
Fix for Magento Admin – Error 404 page not found
Sometimes, expecially when you migrate to another server, the admin page can be missing.
1 - Error 404 admin page /admin
Before anything check your configuragion file ( app/etc/local.xml) and make sure that you have "admin" as value for the "frontname" tag.
ex.:
Usually when you try http://yoursite.com/admin it gives you the admin area
Try using an url like that http://yoursite.com/index.php/admin
and if it works probably you need to only modify the rewrite rules or follow the suggestions (see the link below)
edit the file "app/code/core/Mage/Core/Model/Session/Abstract/Varien.php"
in magento 1.3 replace:
in magento 1.4 and above - comment out:
source: http://www.magentocommerce.com/wiki/how_to_fix_login_for_admin_on_local_install
2 - Error 404 in the admin page due to the failed TLS/SSL
If you get a 404 error page due to the redirect to a secure ssl page
Just run this sql (ex. with phpmyadmin):
Source: http://www.magentocommerce.com/wiki/recover/ssl_access_with_phpmyadmin
3- Problem error 404 for the admin page due to the incorrect importation of the sql data
If the directive
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */
have been ignored during the import it should be better to re-import the whole backup otherwise several records can be wrong as those that are giving problems (see below)
Make sure that core_store, core_store_group, core_website, and customer_group table ids have the value of '0'.
Check that the values in the database are correct otherwise run this sql command if you don't have time to waste or you don't have the previous backup to reimport:
NOTE: delete the cache files in var/cache. Remove the cache in your browser. Restart the browser if you are switching IP addresses via hosts file
Fix for Magento Admin – Error 404 page not found
Sometimes, expecially when you migrate to another server, the admin page can be missing.
1 - Error 404 admin page /admin
Before anything check your configuragion file ( app/etc/local.xml) and make sure that you have "admin" as value for the "frontname" tag.
ex.:
<adminhtml>
<args>
<frontName><![CDATA[admin]]></frontName>
</args>
</adminhtml>
Usually when you try http://yoursite.com/admin it gives you the admin area
Try using an url like that http://yoursite.com/index.php/admin
and if it works probably you need to only modify the rewrite rules or follow the suggestions (see the link below)
edit the file "app/code/core/Mage/Core/Model/Session/Abstract/Varien.php"
in magento 1.3 replace:
session_set_cookie_params(with:
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
);
in magento 1.4 and above - comment out:
if (!$cookieParams[’httponly’]) {example:
unset($cookieParams[’httponly’]);
if (!$cookieParams[’secure’]) {
unset($cookieParams[’secure’]);
if (!$cookieParams[’domain’]) {
unset($cookieParams[’domain’]);
}
}
}
if (isset($cookieParams[’domain’])) {
$cookieParams[’domain’] = $cookie→getDomain();
}
/*
if (!$cookieParams[’httponly’]) {
unset($cookieParams[’httponly’]);
if (!$cookieParams[’secure’]) {
unset($cookieParams[’secure’]);
if (!$cookieParams[’domain’]) {
unset($cookieParams[’domain’]);
}
}
}
if (isset($cookieParams[’domain’])) {
$cookieParams[’domain’] = $cookie→getDomain();
}
*/
source: http://www.magentocommerce.com/wiki/how_to_fix_login_for_admin_on_local_install
2 - Error 404 in the admin page due to the failed TLS/SSL
If you get a 404 error page due to the redirect to a secure ssl page
Just run this sql (ex. with phpmyadmin):
UPDATE `core_config_data` SET `value` = '0' WHERE `path`='web/secure/use_in_frontend';
Source: http://www.magentocommerce.com/wiki/recover/ssl_access_with_phpmyadmin
3- Problem error 404 for the admin page due to the incorrect importation of the sql data
If the directive
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */
have been ignored during the import it should be better to re-import the whole backup otherwise several records can be wrong as those that are giving problems (see below)
Make sure that core_store, core_store_group, core_website, and customer_group table ids have the value of '0'.
Check that the values in the database are correct otherwise run this sql command if you don't have time to waste or you don't have the previous backup to reimport:
SET FOREIGN_KEY_CHECKS=0;Source: http://stackoverflow.com/questions/5178066/error-404-not-found-in-magento-admin-login-page
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;
NOTE: delete the cache files in var/cache. Remove the cache in your browser. Restart the browser if you are switching IP addresses via hosts file
I am using wamp i am not able to find the location in the first step... help to resolve the problem and i have one more issue CSS is not loading in the website(localhost)
ReplyDelete@Achyuta Surya Teja
ReplyDeleteyou need to write what is the magento version, what is the specific page/error that is leading to a 404 page, etc.
If the css is not loading in frontend probably you need to check the your configuration or paths of the template.
if you have an htaccess check if the rewritebase is correct.
Before anything you need to solve the admin area problem.