Forum

Thread tagged as: Problem

Cant log in after Perch update!??

I just updated to the most recent Perch, from Perch and now I cant log in to the Perch admin.

I tested the update first on the staging site - no problems there and can login fine. But on the live site, I try logging in and nothing happens. No error message, no blank screen. Nothing.

Not even sure what code, if any I should show you since I cant login to diagnostics.

Chris James

Chris James 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I think that's covered in the instructions. Give this a try:

Note: if you can’t log in after updating, go to /perch/core/update in your browser so the updater can run. Then you’ll be able to log in.

https://grabaperch.com/update/v2-8-29

Thanks Drew but still the same problem. I went to bblf.info/perch/core/update. Then try to login with exactly the same result.

Im getting the same problem as well, tried he perch/core/update, tried re-updating perch with fresh core files.

It works fine on my dev site after i ran perch/core/update its just the live site wont get past the log in screen.

I did notice when i turned on debug that the live site returns one more query than the dev site does, not sure that helps…

Cheers

Drew McLellan

Drew McLellan 2638 points
Perch Support

What does the debug output?

ON my login page it outputs this


Debug Message [25] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0 Queries: 1 Memory: 1.5568

on the site homepage its this

ELECT DISTINCT idx.itemID FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' AND ((idx.indexKey='_category' AND idx.indexValue LIKE 'blog/featured-heading-post/%' OR idx.indexKey='_category' AND idx.indexValue='blog/featured-heading-post/'))
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' AND idx.itemID IN ('55', '357', '356', '355', '354', '353', '352', '351', '350', '349', '348', '358', '359', '365', '367', '368', '369', '370', '371', '373', '375', '374', '377', '376', '378', '380', '381', '387', '386', '388', '390', '391') WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2016-06-01 14:00:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 1
[1] SELECT FOUND_ROWS() AS `count`
[25] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] Using template: /templates/blog/featured_post.html
[1] SELECT * FROM perch2_blog_sections ORDER BY sectionTitle ASC
[1] SELECT * FROM perch2_blogs ORDER BY blogTitle ASC
[3] SELECT DISTINCT idx.itemID FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' AND ((idx.indexKey='_category' AND idx.indexValue LIKE 'blog/next-meeting/%' OR idx.indexKey='_category' AND idx.indexValue='blog/next-meeting/'))
[0] SELECT DISTINCT idx.itemID FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' AND ((idx.indexKey='_category' AND idx.indexValue LIKE 'blog/main-featured/%' OR idx.indexKey='_category' AND idx.indexValue='blog/main-featured/'))
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' AND idx.itemID IN ('16', '366', '372') WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2016-06-01 14:00:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 1
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/blog/sidebar-post-in-list.html
[37] SELECT DISTINCT idx.itemID FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' AND ((idx.indexKey='_category' AND idx.indexValue LIKE 'blog/next-meeting/%' OR idx.indexKey='_category' AND idx.indexValue='blog/next-meeting/') OR (idx.indexKey='_category' AND idx.indexValue LIKE 'blog/featured-heading-post/%' OR idx.indexKey='_category' AND idx.indexValue='blog/featured-heading-post/') OR (idx.indexKey='_category' AND idx.indexValue LIKE 'blog/previous-meetings/%' OR idx.indexKey='_category' AND idx.indexValue='blog/previous-meetings/'))
[1] SELECT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' AND idx.itemID NOT IN ('55', '357', '356', '355', '354', '353', '352', '351', '350', '349', '348', '358', '359', '365', '367', '368', '369', '370', '371', '373', '375', '374', '377', '376', '378', '380', '381', '387', '386', '388', '390', '391', '16', '366', '372', '17', '360') WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2016-06-01 14:00:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 1
[1] Using template: /templates/blog/sidebar-post-in-list.html
[2] SELECT DISTINCT idx.itemID FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' AND ((idx.indexKey='_category' AND idx.indexValue LIKE 'blog/previous-meetings/%' OR idx.indexKey='_category' AND idx.indexValue='blog/previous-meetings/'))
[1] SELECT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' AND idx.itemID IN ('17', '360') WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2016-06-01 14:00:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the debug on the login page change after you try to log in?

If not, it's possible you're being logged in and then thrown back out immediately. Is there anything in your server error log?

On the log in page i get

Debug Message
[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='b3ccfc1bb02942a5567cda6fc9607535' LIMIT 1
[11] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Queries: 2
Memory: 1.6433

Well just as I was checking the debug output for the second time, it allowed me to login fine. There appears to be no problem now

Yeah i just fixed it, must have been something to do with the database.

I just replaced the live DB with a copy from dev and its working now!

Drew McLellan

Drew McLellan 2638 points
Perch Support

Perfect.