Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to login to backend bounces back #105

Closed
gfxguru opened this issue Oct 19, 2012 · 46 comments
Closed

trying to login to backend bounces back #105

gfxguru opened this issue Oct 19, 2012 · 46 comments

Comments

@gfxguru
Copy link

gfxguru commented Oct 19, 2012

latest build as of 10/18/2012 - Trying to login with correct username and password bounces back to "The page your requested was not found,... everytime. I have "www.mydomain.com/index.php/admin/admin/dashboard/index/key/c4f8e034f76ef10384......." in the url. I tried with the new "backend" url and, same thing.

Please do not close this issue until you look at what we are saying!. You closed anothers issue with the same problem and why? #85

@northstarcomp
Copy link

I am having the same issue. index.php/backend/admin/dashboard/index/key/ee2f890684d94abef19c10720ae6e757/ or index.php/backend/dashboard/index/key/ee2f890684d94abef19c10720ae6e757/ on a test server. I have cleared cache and cookies. IT bumps me to the "Whoops, our bad..." page. ver. 2.0.0.0-dev1 and PHP Version 5.4.7 I have also check the htaccess file for the rewrite base. Any direction would be great.

@buskamuza
Copy link
Contributor

Magento 2 is not compatible with PHP 5.4 yet. The known issue is one described above. It's related to bug in SimpleXML in PHP 5.4 - see https://bugs.php.net/bug.php?id=62639. Looks like PHP are not going to fix it soon.

@magento-team
Copy link
Contributor

Hi @gfxguru - are you trying it on PHP 5.4 or 5.3?

@gfxguru
Copy link
Author

gfxguru commented Oct 26, 2012

We've updated to 5.4 in dev and still on 5.3 in production. I see this is an issue going forward, anyway to circumvent?

@riconeitzel
Copy link
Contributor

As far as i see magento tries to parse the request 2 times… first parse process is okay, second destroys the params so that it results in 404…

@barbazul
Copy link
Contributor

Guys, are you following #107 ?

There is a discussion going on about the pros and cons of moving to 5.4 which is very related to this issue (PHP 5.4 is still not supported by Magento2)

@northstarcomp
Copy link

I got it running on a fresh install of a VM Cento OS 6.3 with Zend Server CE with PHP 5.3 and Apache2. I am still unable to lunch Magento connect. It sends be back to

http://localhost/downloader/?return=http%3A%2F%2Flocalhost%2Findex.php%2Fbackend%2Fadmin%2F

Welcome to Magento's Installation Wizard!
Downloader ver. 1.5.0.0-rc2

Our Magento is version ver. 2.0.0.0-dev29

Not sure if its a Zend Server/PHP issue back end error/issue in the parse...

Any thoughts ideas or comments would be appreciated. I would like to start testing so that we (my company and the community) can have a viable and stable project at release.

Our production system is on AWS E2C and our testing is on IBM XSeries 3650 Dual Quad Core and 24Gb Ram. So I would love to put it through its paces.. Our current web store has about 250-300K items so it will give it a little work out.

@magento-team
Copy link
Contributor

Hello. Where do you save sessions? If files - can you try to change session_save in local.xml from file to db and let me know if it helped?

@riconeitzel
Copy link
Contributor

Doesn't help here.

Best,
Rico

Am 29.10.2012 um 10:38 schrieb mage2-team notifications@github.com:

Hello. Where do you save sessions? If files - can you try to change session_save in local.xml from file to db and let me know if it helped?


Reply to this email directly or view it on GitHub.

@magento-team
Copy link
Contributor

Hi @gfxguru, @northstarcomp and @riconeitzel

Can you, please, provide more information for us to reproduce the bug?

  1. What is your PHP version (a full one - e.g. "5.3.18").
  2. What is your operating system and its version?
  3. What is your Magento 2 version (GitHub commit you cloned from)?
  4. Do you use APC?
  5. Where are your sessions stored - filesystem, database, memcache, etc?
  6. Do you have error messages in frontend or in Magento/Apache/PHP logs?
  7. Can you turn developer mode on and look for any error messages at frontend?
  8. Can you login as customer to you account?
  9. What is your backend and frontend addresses?

A phpinfo() log would be of great help as well (i.e. you can upload it to some service and provide a link).

Thank you.

P.S. Also a note, guys: Magento 2 backend doesn't work on PHP 5.4 as for now. It is a known issue, and we will fix it soon. However, if PHP 5.4 is the cause of this ticket, then the ticket can be just closed.

@riconeitzel
Copy link
Contributor

For me it's php 5.4.4 - so I'll stand by for the fix. Thanks for pointing that out!

@northstarcomp
Copy link

I am running CentOS (Pretty much Red Hat Enterprise) 6.3, PHP 5.3, Apache 2.2 and Zend Server. All Updates out of
The Base Repositories for our Linux. We are LTS not Bleeding Edge.

Our Sessions are stored in File

You can also see my prior 2 posts for more details.

Logging in 192.168.150.50/index.php/admin <---this is our development server not a live server...
I will try to grab the others logs in a day or two for you.

This is all a clean install and get these errors. I can post my configuration steps IE type this do this ect step by step as we keep a pretty good log as to what we do so we can apply it to our live site without too many variations.

@ideirj
Copy link

ideirj commented Dec 1, 2012

apache 2.2.22
php 5.4.3
http://localhost.com/magentonew/index.php/backend/admin/dashboard/index/key/..../
Whoops, our bad...

apache 2.2.22
php 5.3.13
http://localhost.com/magentonew/index.php/backend/admin/dashboard/index/key/..../
Whoops, our bad...

magento version: 2.0.0.0-dev33
windows7
don't use apc
session: filesystem
(default magento install settings)

localhost.com an alias (127.0.0.1 is also doesn't work and also dev32 version)

@hidonet
Copy link

hidonet commented Dec 16, 2012

same problem here...

@magento-team
Copy link
Contributor

@hidonet - can you provide the following:

What is your PHP version (a full one - e.g. "5.3.18").
What is your operating system and its version?
What is your Magento 2 version (GitHub commit you cloned from)?
Do you use APC?
Where are your sessions stored - filesystem, database, memcache, etc?
Do you have error messages in frontend or in Magento/Apache/PHP logs?
Can you turn developer mode on and look for any error messages at frontend?
Can you login as customer to you account?
What is your backend and frontend addresses?
A phpinfo() log would be of great help as well (i.e. you can upload it to some service and provide a link).

Thank you.

P.S. Also a note, guys: Magento 2 backend doesn't work on PHP 5.4 as for now. It is a known issue, and we will fix it soon. However, if PHP 5.4 is the cause of this ticket, then the ticket can be just closed.

@hidonet
Copy link

hidonet commented Dec 17, 2012

PHP Version 5.4.9 ( I'm waiting for fix too )

CentOS release 6.3 (Final)

Github zip

No apc

Sessions stored in file

No error messages on frontend. I cannot loggged in to admin and not enabled logging. I will try it soon...

I've turned on developer mode but no error, no log...

I've tried to register. Registered successfully. Logged in without problem. But redirected to get.php after logout and 404 error occured : Not Found
The requested URL /get.php was not found on this server.

Thank you...

@colinmollenhour
Copy link

I just did a fresh install from 2.0.0.0-dev35 (51f963) and I cannot login to the backend (after login it redirects to dashboard and then back to login page again). The session is being written in var/session and using xdebug I see that I am authenticated but after the first request redirects to the dashboard I am no longer logged in (session not getting picked up by next request). Inspecting my cookies I only see a PHPSESSID cookie and no "adminhtml" cookie being set. When I debug the line where setSessionName can be called it isn't because there is no $sessionName provided to the MCMS_Abstract->start() method.

It is odd though that the frontend DOES work.. It sets a "frontend" cookie that stays the same on every request and I was able to create an account and login to the frontend account.

In my local.xml I have "backend" set as my global/areas/adminhtml/frontName.

EDIT: PHP 5.3.14
Screenshot of response after submit correct login: http://screencast.com/t/5kQx4WXQKOgR

@cmuench
Copy link
Contributor

cmuench commented Dec 18, 2012

Same problem with current Ubuntu and also PHP 5.4.

@magento-team
Copy link
Contributor

Hi. One more idea is that it might be related to session cookie lifetime. Can you try to increase it to over the default of 3600 and try again?
UPDATE core_config_data SET value = '86400' WHERE path = 'web/cookie/cookie_lifetime';

might be related to this #168

http://www.yireo.com/blog/1296-windows-7-google-chrome-magento-admin-cookie-problem

@colinmollenhour
Copy link

The UPDATE query doesn't work since the value does not already exist in the database but I did use INSERT and then cleared the cache.

However, increasing the cookie lifetime didn't fix it for me. Not sure about for others but for me the issue is that the cookie name used to init the session is the default "PHPSESSID" rather than "adminhtml". This cookie is set without a specified lifetime as can be seen in my screenshot, so the lifetime is the browser session.

@buskamuza
Copy link
Contributor

I also have only PHPSESSID, but I can successfully login to backend (Windows, Apache 2.2, PHP 5.3, turned on gzip compression for Apache). The cookie is live until you close the browser, so "cookie lifetime = session lifetime" should not be the problem. Maybe you have some specific settings for cookies in your browser?

@kokoc
Copy link
Member

kokoc commented Dec 19, 2012

You could also check server time in response headers. Some browsers may invalidate cookie just after reciving expired headers

@colinmollenhour
Copy link

@buskamuza My browser works with several other installations of Magento.. You can see in the headers that no lifetime is specified so I don't see how this can be a browser issue..

@kokoc Again, no expiration is specified for the cookie so how can it be expiring due to time-related issues if the expiration is the browser session lifetime?

Note, I fixed the bug which causes the proper session name to not be used (4c5ddef) but I still can't login..

@buskamuza
Copy link
Contributor

@colinmollenhour I still can't find cause of the issue, but I have same PHPSESSID, as you have and same "Expiration = Session", see attached screenshots:
headers
cookie

So I'm not sure, that such cookie name or expiration is the cause of the issue. That's why I want to find other differences in our configurations (server- or client-based).

@colinmollenhour
Copy link

@buskamuza Thanks for helping me troubleshoot. I used xdebug quite a bit and agree that the session name is not the issue since as long as it is inited with the same name each time it should work. I just submitted the patch since it is still a bug, just not one that breaks anything. :)

One thing that wasn't apparent to me is where the admin user id is stored in the session. I could see that the session held an object but I don't see anything related to serializing the user object and nowhere could I find a use of setUserId.. However, it obviously works for some people so it's got me rather confused.. Unfortunately I didn't have time to continue troubleshooting the issue further so I gave up.

@magento-team
Copy link
Contributor

Hello. Could you please double check the issue now since there was one code change published that should resolve it?

@magento-team
Copy link
Contributor

Closing due to no response/activity on this ticket. If this issue is not resolved, please comment/open a new issue.

@tobi-pb
Copy link

tobi-pb commented Apr 8, 2014

Hey Guys,

this still happens on MAMP with PHP 5.4.4 in case of storing session data in file-system and not in database.

Please reopen it :)

Tobi

@indikagamage
Copy link

me toooo. I cant login after instalation

@ihor-sviziev
Copy link
Contributor

I think this issue is reproducing with php 5.4 only
08 Май 2014 г. 20:34 пользователь "indikagamage" notifications@github.com
написал:

me to I cant login after instalation


Reply to this email directly or view it on GitHubhttps://github.com//issues/105#issuecomment-42580161
.

magento-team pushed a commit that referenced this issue Feb 27, 2015
[UI] LESS variables refactoring
@alihalabyah
Copy link

PHP 5.6 same issue!

@ihor-sviziev
Copy link
Contributor

Which OS? Do you have some messages in var/log, Apache error log?

On Saturday, March 28, 2015, Ali Halabyah notifications@github.com wrote:

PHP 5.6 same issue!


Reply to this email directly or view it on GitHub
#105 (comment).

@alihalabyah
Copy link

Hello @ihor-sviziev,

I'm using Ubuntu 14.04 LTS and tried to clear the cache, disable the cache, clear the broswer cookies, switch the session to DB but nothing worked!

@kandy
Copy link
Contributor

kandy commented Mar 29, 2015

Please, try login with Firefox

@alihalabyah
Copy link

@kandy forgot to mention that I've tried the following too:

  • Chrome incognito
  • Firefox
  • Opera

And the same issue happened!

@kandy
Copy link
Contributor

kandy commented Mar 29, 2015

Can you attach headers from "login" request (for example screenshot of developer tools from browser)

@alihalabyah
Copy link

Following the response header:


HTTP/1.1 302 Found
Date: Sun, 29 Mar 2015 08:56:15 GMT
Server: Apache/2.4.7 (Ubuntu)
Set-Cookie: admin=m57j1f7948v20vtd7d07djg1b5; expires=Sun, 29-Mar-2015 09:56:17 GMT; Max-Age=3600; path=/index.php/default/admin; domain=magento2.shopgo.io; HttpOnly
Expires: Sat, 29 Mar 2014 08:56:17 GMT
Cache-Control: max-age=0, must-revalidate, no-cache, no-store
Pragma: no-cache
Set-Cookie: admin=i3e40r57cmu2vjcgdu69nc2mj4; expires=Sun, 29-Mar-2015 09:56:17 GMT; Max-Age=3600; path=/index.php/default/admin; domain=magento2.shopgo.io; HttpOnly
Set-Cookie: X-Magento-Vary=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Location: http://magento2.shopgo.io/index.php/admin/admin/dashboard/index/key/5dd715ef21b8c87fcba6d6dab64708e7a0be0234ce1caa21ac522af3a2326144/
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

@kandy
Copy link
Contributor

kandy commented Mar 29, 2015

Thanks
Can you provide your local machine time with timezone (or in GMT)

@kandy
Copy link
Contributor

kandy commented Mar 29, 2015

looks like problem in cookies path - for same reason it sets to /index.php/default/admin instead of /index.php/admin

@alihalabyah
Copy link

Hello @kandy,

My current time is Sun Mar 29 13:24:16 EEST 2015

Any suggestions to solve this issue?

@kandy
Copy link
Contributor

kandy commented Mar 29, 2015

No, currently :(
Can you provide the result of this query select * from core_config_data where path like 'web%'

@alihalabyah
Copy link

@kandy,

Here you go, I see that your trying to make sure of the cookies configuration, anything wrong?

screen shot 2015-03-29 at 3 02 14 pm

@EliasZ
Copy link
Contributor

EliasZ commented Mar 29, 2015

Used to encounter this problem and it had to do with the timezone on my machine not being the same as selected during the Magento 2 installation process. When debugging, it was something with cookies being set for expiration in the past which translated to being able to log in and then immediately having an expired session which would result in the login screen showing again.

@kandy
Copy link
Contributor

kandy commented Mar 29, 2015

@alihalabyah,
Looks like issue caused by enabling "Add Store Code to Urls"
Run query update core_config_data set value = 0 where path = 'web/url/use_store', clear cache and try relogin

@alihalabyah
Copy link

@kandy,

mmm that fixed it, but it should work even with the store code in the urls enabled, no?

Thank you for your help!
Ali

@kandy
Copy link
Contributor

kandy commented Mar 29, 2015

Yes, it's definitely should work with this option

magento-team pushed a commit that referenced this issue Nov 3, 2015
magento-engcom-team pushed a commit that referenced this issue Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests