We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Problem

Hi Drew

Thanks for this.

I entered http://www....co.uk/perch/core/update in the browser and the string in the address bar changed to http://www....co.uk/perch/ and showed the login screen. I tried to login and the string in the address bar changed to http://www...co.uk/perch/?r=%2Fperch%2Fcore%2Fapps%2Fcontent%2F ie as before.

We seem to be stuck in the mud on this one. Is there anything else I might try? Or I can give you the login credentials...?

Cheers - Mark

Drew McLellan

Drew McLellan 2638 points
Perch Support

I thought you couldn't log in. Is that not the case?

That's right, I can't login.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. I'm not sure what help the login credentials will be to me.

Have you manually reset your password to get yourself in to check the diagnostics?

Is there a link to how to do that? I know what the password is, that's not the issue.

I thought you might like the credentials so you could see first hand what's happening.

Drew McLellan

Drew McLellan 2638 points
Perch Support

There's no link - you can update the database table to use an MD5 hash of the password you want. When you log in, it then gets rehashed more securely.

But if you know the password then you can log in, right?

Hi Drew

The whole problem is that I can't log in with the password. I don't get an error message, the firelds are simply emptied and I am re-presentesd with the log in screen.

The trail is all above but in short, I upgraded the site to the latest version of Perch and Events, Blog and Gallery and now I can't log in. I dont get an error message, just the text in the address bar as described above. The upgraded site is now sitting at a staging post.

This has now been going on for almost ten days. Maybe it would be simpler if I just gave up?

Cheers - Mark

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the URL change when you try to log in?

Yes, as per post above (1 day ago)...

I tried to login and the string in the address bar changed to http://www...co.uk/perch/?r=%2Fperch%2Fcore%2Fapps%2Fcontent%2F ie as before.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you turn debug on and try to log in, what does it output?

When I type www.sitename.co.uk/perch into the address bar debug outputs:

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

I then enter my username and password and 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='xxx' LIMIT 1 [10] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0 Queries: 2 Memory: 1.3128

(Obviously xxx replaces the actual string)

Not sure whether that heps...

Drew McLellan

Drew McLellan 2638 points
Perch Support

What columns does your perch2_users table have?

SHOW COLUMNS FROM perch2_users Profiling [ Edit ] [ Create PHP Code ] [ Refresh ]

  • Options Field Type Null Key Default Extra
    userID int(10) unsigned NO PRI NULL auto_increment userUsername varchar(255) NO
    userPassword varchar(255) NO
    userCreated datetime NO 2000-01-01 00:00:00 userUpdated timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP userLastLogin datetime NO 2000-01-01 00:00:00 userGivenName varchar(255) NO
    userFamilyName varchar(255) NO
    userEmail varchar(255) NO
    userEnabled tinyint(1) unsigned NO MUL 0
    userHash char(32) NO
    roleID int(10) unsigned NO 1
    userMasterAdmin tinyint(1) unsigned NO 0
Drew McLellan

Drew McLellan 2638 points
Perch Support

You're definitely missing columns - it's like you've not run the update since changing the files.

Did you absolutely follow the instructions about updating and what to do if you can't log in after updating?

Yes, if you mean what you advised above. Is that what you mean?

Drew McLellan said:

You're definitely missing columns - it's like you've not run the update since changing the files.

Your perch2_users table should be as below:

SHOW COLUMNS FROM perch2_users
userID
userUsername
userPassword
userUpdated
userLastLogin
userGivenName
userFamilyName
userEmail
userEnabled
userHash
roleID
userMasterAdmin
userPasswordToken
userPasswordTokenExpires
userLastFailedLogin
userFailedLoginAttempts

so something is clearly wrong with your install/update. Did you make a backup of the database before you began the original update? I would roll back, then re-install the updates and see if the issue resolves. If not it might be time to contact someone on the Perch Registered Developers List who is able to get onto your server, see exactly whats going on and fix the issue.... Of course you can continue this in the forum but honestly I am thinking the ultimate solution is going to require server access which is likely beyond the scope of the forum.

Hi Drew, thanks for this. Yes, I backed it all up so I'll try the update over again. If that doesnt work, I'll do as you suggest regarding the PRL. Meantime, let's park this thread.

Thamls again for all your help.

Cheers - Mark

mark buckley said:

Hi Drew, thanks for this. Yes, I backed it all up so I'll try the update over again. If that doesnt work, I'll do as you suggest regarding the PRL. Meantime, let's park this thread.

Thamls again for all your help.

Cheers - Mark

Mark, just to be clear, I am Robert Ketter (a registered developer), not Drew McLellan who has been helping you through this thread.