Forum

Thread tagged as: Problem

No users table in database

The database for our site has no perch2_users table. We can log in on the live site, but the localhost keeps giving us the error that the license key is not valid for the localhost domain. The only reference I can find to fix that issue is adding a user that is an editor, which I would have to do in the database, but there is no table.

Locky Keaney

Locky Keaney 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

If you are having a license key error then you need to log into your Perch account and add localhost there for this license. It has nothing to do with your installation.

It has been set like that for about 12 months. I logged in, tried saving it again, still can't log in. The problem has just started yesterday.

Debug Message:

Debug Message
Activating via CURL
{"result":"FAILURE"}
Activation: failed
Writing auth fail to log.
[40] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Queries: 1
Memory: 1.1639
Array
(
    [type] => 2
    [message] => http_build_query(): Parameter 1 expected to be Array or Object.  Incorrect value given
    [file] => /Users/nathan/Documents/LOCAL/clients/learn-to-fly-new/www/perch/core/lib/PerchAuthenticatedUser.class.php
    [line] => 196
)

Locky,

Are you logging into your account on the PERCH website @: https://grabaperch.com/account then updating the license with localhost as a domain for this license?

As Rachel has said, "license key error", "It has nothing to do with your installation."

What is your local domain? localhost, 127.0.0.1 or are you using a virtual like myfancywebsite.local... whatever you are using to access this site locally has to be added to your license on the PERCH website to validate your license for website admin.

I am using localhost, and the error when logging in says "Sorry, your license key isn't valid for this domain. Log into your Perch account and add the following as your live or testing domain: localhost". In the account settings, I have both the development and staging domains as localhost just in case. I haven't changed the development setup on my computer since the last time it worked.

"Sorry, your license key isn't valid for this domain."

This is a validation error for sure...

OK, so one way to test this is to disconnect your network cable from your computer so the computer has no internet access, then using https://localhost/perch try and login now... if you're able to successfully login, then you have confirmed this is a license validation issue... on the other hand if you continue to get the error, something in your setup may have changed with or without your knowledge...

I could login fine when I was disconnected from the Wifi. I was hoping that the situation might be fixed and tried logging in while connected, but the issue persists. For now, I can log in while offline, and just leave the page open and logged in, but just as a temporary fix.

EDIT: To clarify, the issue is only on localhost, the live site is still fine.

Ok, so we have fully established this is an authentication error. Do you have more the (1) perch license? If so, please check your config file and verify the license number matches the one on the perch website. If it's right and you are certain your working on the right license in your account I would replace the "localhost" with something else, save, then change back to "localhost" and save again. This way we know the database was forced to save changes. Now try again to login.

I will not get into the reasons why you were able to login while disconnect except to say this was the expected behavior which verifies your local setup is working correctly. These results also confirm the authentication is failing, which has to do with how it interacts with the license server and the setting on your account.

If after all this it's still not working correctly your going to have to wait for Drew or Rachel to assist further. :( Sorry

We have 9 licenses on the account. I double checked, the License number is the correct one, and I removed and then resaved localhost, and the issue still persists. Thank you for your help, hopefully this is seen by Drew or Rachel soon.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you still have no users table in your database?

Hey,

I have the users table back, but I still get the license error.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is your install up to date?

Cool, I did an update and can log in! I'm just a bit worried about the shop we have attached to the site. I updated that as well, and there shouldn't be any issues, in theory anyway.

Going back to this, I would prefer if we didn't have to upgrade to perch3. When we do on local, we lose ALL content from our templates across the site, as now the id needs to be camel case. Our live site is still perch2, and just need our license key to work on localhost. Can you reset it so it works?

Drew McLellan

Drew McLellan 2638 points
Perch Support

When we do on local, we lose ALL content from our templates across the site, as now the id needs to be camel case.

There's been no change to ID requirements since Perch 1. Can you explain what you're seeing?