Forum

Thread tagged as: Problem

unable to log in to admin panel

I have just moved a site from local development to staging. The move went very well beginning with a positive compatibility test. The staging site is functioning beautifully with the imported database. Everything is great except that I am unable to log in to the staging site's administration area.

I have checked the url of the staging site with my perch license. My license url is in this form: staging.mysite.com

I have NOT put an https://www. in the license address. I did that with an earlier site and learned it was not the way to go.

Do you have any idea what could be wrong?

Kimberly Olmsted

Kimberly Olmsted 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

What error message are you getting when you try to log in?

Sorry, those details are incorrect. Please try again.

I used the same username and password that I used for local development.

I also tried the database username and password (matching the config file) -- to no avail.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That message indicates that the username/password aren't matching (for whatever reason), no it's not anything to do with the licensing (you get a specific message for that).

Can you turn on debug in your config file and let me know what it outputs at the bottom when login fails?

https://docs.grabaperch.com/docs/installing-perch/configuration/debug/

Here's what debug prints out:

Time Δ Message -0.0307 0 Activating via CURL 0.1371 0.1678 {"result":"SUCCESS","latest_version":"2.5.3","on_sale_version":"2.7.3"} 0.1501 0.013 DELETE FROM perch2_settings WHERE settingID='latest_version' AND userID=0 LIMIT 1 0.3708 0.2207 INSERT INTO perch2_settings(settingID,settingValue,userID) VALUES('latest_version','2.5.3',0) 0.3712 0.0005 DELETE FROM perch2_settings WHERE settingID='on_sale_version' AND userID=0 LIMIT 1 0.3716 0.0004 INSERT INTO perch2_settings(settingID,settingValue,userID) VALUES('on_sale_version','2.7.3',0) 0.3719 0.0003
stdClass Object ( [result] => SUCCESS [latest_version] => 2.5.3 [on_sale_version] => 2.7.3 ) 0.3719 0 Activation: success 0.372 0 SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled='1' AND userUsername='kimografix' LIMIT 1 0.3724 0.0005 User exists, checking password. 0.3787 0.0063 Stronger password hash. 0.3853 0.0066 Password failed to match. 0.4058 0.0205 SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0 0.4353 0.0295 Queries: 10 0.4353 0
Array ( [type] => 2 [message] => session_start(): open(/home/users/web/b808/moo.reddesigncom /cgi-bin/tmp/sess_7f72a0e7374c41235690f3ff3025dea7, O_RDWR) failed: No such file or directory (2) [file] => /hermes/waloraweb089/b808/moo.reddesigncom/staging/perch/core/lib/PerchSession.class.php [line] => 9 )

Kim. Are you comfortable using phpmyadmin? I can post a known password and you replace the current password. Then you can try logging in again. It's really very dangerous working in database so do not proceed unless you have made a backup of db and are fully confident about working in db.

See Post: link

Hi Robert,

I was prompted by Perch to reset my password which I did and when I tried that it also did not work. Does that alter your thought on what my next step might be?

Kim. I'm guessing you reset password using the reset password link, my method is just replacing the password in the db with a known password and seeing if you can then login. I do this method a lot when contacted about this kind of error. I just like to rule out if something in the hashing of new passwords could be the issue.

i just want to help you, and my method is one I am comfortable doing, but it's not the only method.

:)

Robert, I am comfortable finding my way around phpMyAdmin. I have successfully uploaded my database and can do that again if necessary.

I will/would need some specific directions to change the password in phpMyAdmin though. With a little searrching I could not find where that is located in phpMyAdmin. If you are willing to guide, I will follow!

What is meant by a "known password?"

Thanks for your help!

Table: perch2_users

"Known Password" means the hashed password stored in the database is "Known" to be the result of a given password.

Example:

Perch would hash "password" as $P$BlkI9N23JEDenPLYgGCmp/iRx5CyjY1 so if you replace the current unknown/wrong password with the above hash the users new password would be "password"

Where exactly do I put the known password?

When I bring up perch2_users does the known password go in the "userPassord" row in the "Extra" column ?

Or somewhere else?

I'm not seeing any other passwords or places that look obvious to me.

Thanks for your continued help Robert.

Replace the current hash in the "userPassword" with the hash I supplied above. I would post a screenshot but I am on my phone so phpmyadmin is a bit wonky.

That might be the problem. I am not seeing any current hash in any of the columns. Which column should it be in?

Left to right they read:

Type / Collation / Attributes / Null / Default / Extra

Whoa, you are definitely not in the right place.

Perch Developers

If you follow the above link to the perch developers page you will find a link to my company with my email address listed. If you send me an email I would be more than happy to provide more detailed help. Robert

Rachel / Drew:

Can you shed some light on the debug message I received?

Before I even try to type in a username or password I get the following red array message:

Array ( [type] => 2 [message] => session_start(): open(/home/users/web/b808/moo.reddesigncom /cgi-bin/tmp/sess_7f72a0e7374c41235690f3ff3025dea7, O_RDWR) failed: No such file or directory (2) [file] => /hermes/waloraweb089/b808/moo.reddesigncom/staging/perch/core/lib/PerchSession.class.php [line] => 9 )

I have checked the full document root (/home/users/web/b808/moo.reddesigncom /cgi-bin/tmp) and it is correct and the one I used to set a PHP sessions path in my php ini file. I do not know what or where the "/hermes/walaoraweb" part of the second address comes from. Is that a Perch file?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It looks like there's a space in the path after reddesigncom - could you double check the sessions path to make sure that's not the issue?

If PHP can't save session data, you won't be able to log in.

Thanks Drew. You were right.

However, now I get this when I print up the login page:

Time Δ Message 0.0301 0 SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0 0.0485 0.0183 Queries: 1 0.0485 0 Array ( [type] => 8192 [message] => Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater [file] => Unknown [line] => 0 )

and this when I type in my username and password:

Time Δ Message -0.0046 0 Activating via CURL 0.1669 0.1716 {"result":"SUCCESS","latest_version":"2.5.3","on_sale_version":"2.7.3"} 0.1768 0.0098 DELETE FROM perch2_settings WHERE settingID='latest_version' AND userID=0 LIMIT 1 0.1835 0.0067 INSERT INTO perch2_settings(settingID,settingValue,userID) VALUES('latest_version','2.5.3',0) 0.1842 0.0008 DELETE FROM perch2_settings WHERE settingID='on_sale_version' AND userID=0 LIMIT 1 0.1848 0.0006 INSERT INTO perch2_settings(settingID,settingValue,userID) VALUES('on_sale_version','2.7.3',0) 0.1854 0.0005
stdClass Object ( [result] => SUCCESS [latest_version] => 2.5.3 [on_sale_version] => 2.7.3 ) 0.1854 0 Activation: success 0.1854 0 SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled='1' AND userUsername='kimografix' LIMIT 1 0.1858 0.0004 User exists, checking password. 0.1949 0.009 Stronger password hash. 0.2025 0.0077 Password failed to match.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok great. Now it's just a case of not having the correct password.

Did you say that you've not managed to correctly configure email yet?

It's all fixed Drew. I forgot that I had earlier, at Perch's suggestion, reset the password when I first couldn't gain access to the Admin.

Once I remembered that -- after I removed the space in the document root -- I was able to enter the Admin area using that new password.

Thanks again for your help!