magento admin panel inaccessible with no error after server hang

magento admin panel inaccessible with no error after server hang  using -'centos,magento'

the server that a magento install was on crashed for (currently reason unknown) and now the backend is inaccessible. I either get no error or I get access denied. I am able to preform the password reset.

I have tried:

clearing the browser cookies and cache
clearing the session, tmp and cache folders in magento
using the magento database repair tool - no errors were found
creating a new user manually in the admin_users table (this gets access denied)
rebooting the server again (last resort but still no)

The main admin user gets a redirect loop.

Any ideas are welcome, I am now stumped.

EDIT:I am really after any way to recover a magento admin login? or failing this any way to export the data (without exporting the bugged section)

asked Oct 11, 2015 by mannumits1
0 votes

2 Answers

0 votes

I have employed a hack in one of the core magento files detailed here:

I have had to comment out lines in "app/code/core/Mage/Core/Model/Session/Abstract/Varien.php": (please note this is for 1.6 - check link posted for advice on 1.4)

$cookieParams = array(
    'lifetime' => $cookie->getLifetime(),
    'path'     => $cookie->getPath()//,
    //'domain'   => $cookie->getConfigDomain(),
    //'secure'   => $cookie->isSecure(),
    //'httponly' => $cookie->getHttponly()

also line 104 comment out :

//call_user_func_array('session_set_cookie_params', $cookieParams);

It seems to be when the server went down something happened to the session, as the new install also failed.

answered Oct 11, 2015 by abhi
0 votes

You can get your data by performing a database backup via cPanel or mysqldump via SSH access. Your hosting provider should be able to help you. Additionally, you can unzip the admin files from your Magento installed version. Download it to your computer and unzip the installation... then re-zip the folder for app/design/adminhtml ... upload and unpack this on your website in the proper place, and this will reinstall the PHP pages.

Double check the file app/etc/local.xml this usually has the database login stored in it.

Inside the mysql database for your magento installation, there is the table core_config_data and in it, some path values might interfere with using admin if intentionally set incorrectly:

mysql> select config_id, path, left(value,30) from core_config_data WHERE path LIKE '%admin%';
| config_id | path                                      | left(value,30)                 |
|        50 | dev/translate_inline/active_admin         | 0                              | 
|       220 | web/secure/use_in_adminhtml               | 0                              | 
|       687 | admin/startup/page                        | catalog/products               | 
|       690 | admin/security/use_form_key               | 0                              | 
|       691 | admin/security/use_case_sensitive_login   | 1                              | 
|       692 | admin/security/session_cookie_lifetime    | 36000                          | 
|       745 | admin/url/use_custom                      | 0                              | 
|       746 | admin/url/custom                          |                                | 
answered Oct 11, 2015 by akasati02