Magento Admin login kicks me out back to the Admin login - magento

After I enter my username and password and click "Login" it sends me back to the Login page with NO error messages. The URL changes to include a session key and that's it. Everytime I click Login again, the session key is regenerated and I still can't log into the admin interface.

I just encountered this problem on one of my servers (not a localhost installation). Turns out the system account was over quota, so I presume Magento was unable to create the necessary temporary files. (I noticed this when trying to create a directory on the server over ssh.)
So... maybe check to make sure the account under which Magento is running isn't over quota on your server? At the very least, it might not be a Magento problem directly.

Clear the contents of the directory var/cache and try again.
If that doesn't help check the table core_config_data in the database for records with a path value of "web/secure/base_url", "web/unsecure/base_url" and "admin/url/custom". These should match the page you are trying to log into (but without "index.php/admin/" at the end)
Finally check your browser's cookie settings and that the server's PHP is able to set cookies.

I was having the same problem running Magento 1.5.1 on my production server. I would log in to the admin, the url would show the address for the dashboard (with the secure key), but the screen would still be the login screen. There was no error. This happened with FF, Safari, and Chrome.
I fixed it by manually setting two core_config_data values in the database. They are as follows:
web/cookie/cookie_path = /
web/cookie/cookie_domain = "mydomain.com"
clear out var/cache and try to log in. For me, it worked.

Version 1.7.0.2 I have been moving my magento store from on server to another one, and I had the same problem. Use phpamdin to edit your database on new server, search for web/cookie/cookie_domain in 'config path row', the value is probably your old domain name: yourdomain.com, change that to your new domain name OR to your new IP address (new server). If you attend to use your old domain on new server environment you will probably want to set your story ready before you switch your name servers. That was the case for me, after I added my new server IP to web/cookie/cookie_domain instead of domain I was finally able to log into my magento backend.

I had some problems when on a local server. It was on http://server/username/ and so didn't have dots in it. If we changed the settings to be the IP address of the server then it was fine.

There can be several things that cause this behavior. This is my checklist. One of them will eventually fix it.
Click the "forgot password link" and then the "back" link. This will remove any possibly misplaced params in the URL as well as make sure you're on the right server (some installations have separate admin servers)
Clear cookies or use an incognito window
Try another browser
Local installations: Try using 127.0.0.1 instead of localhost (and update the base URL in the core_config_data table)
Clear Magento cache, full_page_cache, and session directories in the magento/var/ directory (and repeat 1 and 2)
Truncate the core_session table
Verify your Magento has correct memory settings
Check Magento system.log and exception.log files and debug
Check PHP's error logs and debug

I've experienced this issue using Opera, while in other browsers it worked fine.
Also, make sure to set correct cookie options in:
System > Configuration > Web > Cookie Settings

Also, make sure that your system time / time zone on the server and php and magento match up.

Related

Magento 1.9 - cannot login to admin after renamed Document Root

I have a subdomain say dev.domain.com that points to document root public_html/dev.
Worked fine, but for good reasons I renamed the folder dev to devm19, also modified the subdomain to point to public_html/devm19.
Problem is I can't login to the admin - The form for UN and PW is there, credentials are correct, but the form key in URL bar keeps refreshing, you just can't get inside to admin.
Any idea?
See the result of the below SQL
select * from core_config_data where path like '%web/cookie/cookie_domain%';
If it gives you "dev.domain.com" in the value field, then either make it blank or give "devm19.domain.com" as value.
Then flush the cache, open the admin panel in private window and you will be able to login.
I was able to solve the issue by modifying app/etc/local.xml.
Added/replaced records for:
<session_save><![CDATA[files]]></session_save>
<session_save_path><![CDATA[/tmp/session]]></session_save_path>

How to correct the url in magento of website and admin panel?

I am doing a project in Magento. I have uploaded my work onto a live server. I have updated the core_config_data table with the server urls in the secure and unsecure urls. But when I typing the live server link, its going to the local server url and also when I am accessing the live servers admin panel its going to the local server url. Can anyone tell why it is like that ?
After changing website from local to live you need to do following changes:
change url's from core_config_data table
change database details from local.xml
and most important, Redirect problem was due to Magento cache.
Simply delete everything from the /var folder.
After performing the above changes, clear your browser's cache & cookies and check again.
On your computer, check your hosts file and see if you have an entry for your domain.
On windows: C:/Windows/System32/drivers/etc/hosts
On mac or ubuntu: /etc/hosts
If you see an entry that shows:
127.0.0.1 www.mydomain.com or
localhost www.mydomain.com
then you should remove your entry.
You should also flush the dns cache.
Whenever I work locally, I use the subdomain 'local' like local.mydomain.com and this way I dont have to worry about these issues.
Also, you should fully delete the var folder, it is safe to do so.

Can't login to Magento admin panel

For test and development, I duplicated our Magento shop to a sub-domain.
mysql -u root -p -e "USE bitnami_magento; UPDATE core_config_data SET value ='http://subdomain.site.com/' WHERE core_config_data.path = 'web/unsecure/base_url'; UPDATE core_config_data SET value ='https://subdomain.site.com/' WHERE core_config_data.path = 'web/secure/base_url';
Everything works, but not the admin Login. On the login page we get it. After entering my user name and password we don't log in. Login error message ("invalid password", etc.) ISN`T being displayed.
We are using 1.9.0.1
Removing cache files ...
sudo rm -r /opt/bitnami/apps/magento/htdocs/var/cache/*
sudo rm -r /opt/bitnami/apps/magento/htdocs/var/session/*
.. and restarting Apache ..
sudo /opt/bitnami/ctlscript.sh restart apache
.. Does not help.
Please any advice - what could be the reason?
If everything works on the front end like you said, and you just can't log into the admin, most probably you have the original adminhtml cookie pointing to your original domain, (www.site.com) and an extra adminhtml cookie for your development domain (subdomain.site.com).
In Chrome, in Developer Tools (right-click on any page element and select Inspect Element), go to the Resources -> Cookies tab. Delete the extra cookie for your original domain. Or set your base url domain to something else, or change the port.
Try using a different web browser, specific try with both Firefox and Chrome. If this resolves it then question is duplicate of Magento admin login not working in chrome but works fine for firefox
Using a different browser won't help because the error is pretty clear.
Try checking the system log and exception log and also, if you have good MySQL skills, have a look on Magento users table in database and make sure that the database is imported properly.
Have you checked your local.xml file for db configuration.
Is db name host name and every thing is fine. If no please do so.
Another thing after moving have you edited core_config_data table. if not please edit core_config_data table by changing the web/unsecure/base_url and web/secure/base_url to match the new domain name by altering the value column for both records.
Hope It will help you.

Access Denied Magento Admin after domain change: correct password

After migrating from an amazon instance to GoDaddy hosting, I am unable to login to Magento backend when using the same username and password,
Adding a new user with a new password gives the same error: access denied
web/unsecure/base_url are set correctly in the database table core_config_table
My cookies are setup as follows
web/cookie/cookie_lifetime 3600
web/cookie/cookie_path NULL
web/cookie/cookie_domain NULL
web/cookie/cookie_httponly 1
web/cookie/cookie_restriction 0
Please let me know any thoughts you may have as I have searched google many times and none of the guides help, and I am starting to feel like I am the only one with this specific issue.
Thanks in advance!
Found the Solution myself after many weeks,
Save this file as newadmin.php in your magento root, then uncomment and replace the credentials with the ones you want, then go to example.com/newadmin.php
Voila!!!
The reason is because administrator permissions were contravened, as far as I know this is the only way to add a working user.
Unfortunately one problem led to the next and I started getting index.php inserted into all of my links when I go into admin panel ex:
example.com/index.php/admin/********
I would be fine with this if it didn't send it to a 404 page, the correct page is:
example.com/admin/********
when I remove index.php from the url it works, but if I click on any link or try to save chages in admin panel, it reinserts the index.php in the url and doesn't POST anything to the page, because it gets sent to a 404 page
Click This Link if you want to follow my bug-fixing adventures:
try after delete var/* folder for remove cache
if not worked then change password from db admin_user table then try it.
Did you name your database and users exactly the same as before?
Some CPanels will automatically choose the first part of the MSQL database for you...
check app/etc/local.xml and see if it's all correct

Magento Front-end "404 Not Found 1"

Situation:
We have a domain name pointing to our old windows server. We purchased a linux server. I wish to build our new webstore on the Linux server. Once I am ready, I will redirect our domain name to the Linux server.
Up to now:
We have Magento installed on the back end. Now I need to have the front-end working
Problem:
I edited the url to be our domain name. I have edited my host file to have the domain name ignore the windows server ip and get directed to the linux server (the one with Magento installed). The page shows up with links and text in a big mess, and the title of the web page says "404 Not Found 1". I get this problem with both the back-end & the front-end.
Thinking:
I am able to access the PHPadmin and edit the url. I tried making the url the Linux server's IP. If I do that, Magento's back-end works but then I get a completely blank page for the front-end. Any suggestion is welcomed.
To make your site visible:
1) Change the links web/unsecure/base_url and web/secure/base_url of the table core_config_data to http://www.yourdomain.com/ or whatever you have.
2) Go to app->etc->local.xml and change your database username,password, host to the right one.
3) if it is still not working go to var and media folders and change the permissions to 777 for all folders and subfolders.If it works you know it is permission problem.
Read this after that and make your decision magento permissions

Resources