Can't login to Magento admin panel - magento

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.

Related

Prestashop Url change

I have a problem,
I changed the url of my prestashop because I have a new url.
But now i have the Problem that i tipped in the wrong path, and if i want to log in as admin then the shop directs me everytime to the wrong path so I can't change anything...
Does anybody know in which folder of the FTP Server I can change it in the data?
I tired to delete the htaccess data but this didn't help me.
Or is it another option to go back to where I started, before i changed the Url?
I think that your problem occurred not from a .htaccess but from your database. Prestashop keeps domain URL in the DB and if you changed it you better to check table configuration fields PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL and table shop_url. I think that the problem is over there.
When you want to migrate to another server, you have to
Update the _DB_... constants in config/settings.inc.php file
Since your database does not changed, this step is not necessary.
Update PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL fields in configuration database table
Update the domain, domain_ssl and physical_uri fields in the shop_url database table
Now you can log in to the admin page. When you did it, your first step has to go to Preference -> SEO & URLs, then turn off and on again the Friendly URLs switch to update the .htaccess files.
These steps are works on Prestashop 1.6, but not tested on 1.7.
See the official blog post for additional details:
https://www.prestashop.com/en/blog/how-to-migrate-prestashop-to-a-new-server

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>

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 Admin Panel URL change not taking effect.

I am attempting to update the admin panel url.
I edited app/etc/local.xml and changed the following line to the desired name:
<frontName><![CDATA[admin]]></frontName>
I then went to my Magento root and cleared the cache by running rm -rf var/cache/*
This exact process worked beautifully when I first tested on my remote staging server, it updated to the new URL immediately. However, there was absolutely no change when I attempted it on my live site. The admin panel still showed up when I visited www.mysite.com/admin.
I had a short window of time when the traffic to our website is low and nobody is actively using the admin panel, so I changed the name back to admin and cleared the cache again after my change did not take effect.
Any ideas what might have gone wrong?
Take a look here.
http://www.pixlpitch.com/3-ways-to-change-magento-admin-path/
I personally used step 3
another way is to change from the admin itself.Goto System→Config→Admin→Admin Base Url→Use Custom Admin Path, set yes. Set new admin path in Custom admin path text field and save.

Magento Admin login kicks me out back to the Admin login

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.

Resources