Forum
Invalid license key when running locally
I'm trying to setup perch locally and i'm getting this error at login:
"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: mysite.local"
I'm running this via MAMP Pro.
Config file:
define('PERCH_LICENSE_KEY', '');
define("PERCH_DB_USERNAME", 'root');
define("PERCH_DB_PASSWORD", '');
define("PERCH_DB_SERVER", "127.0.0.1");
define("PERCH_DB_DATABASE", "mysite_local");
define("PERCH_DB_PREFIX", "perch3_");
define('PERCH_TZ', 'UTC');
define('PERCH_EMAIL_FROM', 'myemail@domain.com');
define('PERCH_EMAIL_FROM_NAME', 'John Doe');
define('PERCH_LOGINPATH', '/perch');
define('PERCH_PATH', str_replace(DIRECTORY_SEPARATOR.'config', '', __DIR__));
define('PERCH_CORE', PERCH_PATH.DIRECTORY_SEPARATOR.'core');
define('PERCH_RESFILEPATH', PERCH_PATH . DIRECTORY_SEPARATOR . 'resources');
define('PERCH_RESPATH', PERCH_LOGINPATH . '/resources');
define('PERCH_HTML5', true);
If installing locally, you still need to have a licence key in config.
During the setup, if you select "install locally", a key should be automatically generated in your config file.
One wasn't generated and I've tried reinstalling multiple times...
Which version of Perch, and which version of PHP?
Ah, MAMP Pro - there seems to be an issue installing Perch where the database password is blank - can you set a password for root or use a different user with a password? I'm not an expert with MAMP unfortunately...
This actually happened with me trying to get around a Perch bug:
setup/config/perch.sample.php
file and rerunning setup installs my tablesTo do all of this I had to:
$dbpassword
from the perch.sample.php file so I can provide nothing as the password$dbpassword
back in the file$dbpassword
from my config file so the database can connectThe first phase creates my tables but not the key. The second phase creates the key.
You need to set a password on your database user account if you want to install Perch. There's no other supported configuration.