2

Trying to login magento admin panel and it returns 404 error.

Here's what I did so far.

  1. Did a check on /public_html/app/etc/local.xml

    <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>
    
  2. Cleared var/session and var/cache.

  3. Access with and without index.php
  4. I ran the following SQL code.

    SET FOREIGN_KEY_CHECKS=0; 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;
    

    SQL returns the following error code.

    #1054 - Unknown column '’admin’' in 'where clause'

  5. Ran with the following SQL Code again due to suspected punctuation marks

    SET FOREIGN_KEY_CHECKS=0; 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;
    
  6. Results:

    # MySQL returned an empty result set (i.e. zero rows).

6
  • any kind soul able to shed some light on this? Commented Jul 27, 2016 at 7:51
  • custom admin url could also be set in configuration. Please check if magento.stackexchange.com/questions/3588/… helps you Commented Jul 27, 2016 at 8:31
  • Are you referring to steps Third, go in your core_config_data table and try to locate these variables (lines 226 + 229): admin/url/custom admin/url/custom_path. I am unable to find admin/url/custom_path. Commented Jul 27, 2016 at 8:58
  • Yes. If you don't find this value, this is not your issue. Let's look at the problem from a different angle: when did this start to occur? were there any changes? Commented Jul 27, 2016 at 9:00
  • I am not good at this, so I tend not to do any changes. The problem occurs this morning when I tried to login. Commented Jul 27, 2016 at 9:04

2 Answers 2

0

Check your var/ folder permission.

If you found error 404 that mean path is not correct if you have done migration try this path http://127.0.0.1/magento/index.php/admin

After login system/web/Use Web Server Rewrites set to NO

1
  • Thanks for the reply. var folder permission at 700 currently. I do not really get your remaining answers. There was no migration done, it was a live website. Commented Jul 27, 2016 at 8:06
0

You have an error in your SQL syntax:

Instead of

’admin’

(apostrophes)

it must be

'admin'

(single quotes)

This is why the error message tells you, MySQL is looking for a column with the name ’admin’ (’ is the apostrophe in wrong character encoding)

5
  • Hi fschmengler, thanks for the reply. That's weird then, the syntax was copied directly. Nevertheless, I have changed them to: SET FOREIGN_KEY_CHECKS=0; 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; It returns: # MySQL returned an empty result set (i.e. zero rows). Tried to access to admin panel, it does not work. Commented Jul 27, 2016 at 8:27
  • apology for the poor formatting. Commented Jul 27, 2016 at 8:27
  • You could update your question with that, there you have better formatting options (code block) Commented Jul 27, 2016 at 8:28
  • Thanks for advice, updated to the question. Not sure if there's anything else I could try? Commented Jul 27, 2016 at 8:36
  • I was able to access and login to downloader url, which has the same login credentials as magento admin panel. Commented Jul 27, 2016 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.