Forum
Perch Licence not working - Development environment
Hi all
I am having trouble with Perch running on my development environment. Even though I have setup my Perch licence so that it accepted my development domain, it's still saying that it's not valid domain.
I am running Laravel Valet as my development environment.
Any ideas?
Thanks in advance.
Steve
Is Perch up to date?
Hi Rachel
Yes, it's running the latest version.
Thanks
It looks like you are not sending the data to our server. The usual reason for that is people running very up to date PHP with an old version of Perch.
If that isn't the case then maybe a firewall blocking the request (eg. you have cURL installed but your Mac firewall is blocking it).
Is there anything in the error log?
Hi Rachel
That is strange. I am running PHP 7.1.2 with the latest version of Perch. I also have my Mac firewall turned off.
Where can I find the error log? Thanks
I don't really know what Laravel Valet is, but which version of cURL is it using? Does it have somewhere to configure your hostname?
Hi Steve, You probably need a custom valet driver for Perch (https://laravel.com/docs/5.4/valet#custom-valet-drivers). I'm gonna see how my local perch sites run on valet this arv (previously used homestead for dev), if I create a working custom driver for it I'll share it.
Cheers, Andrew
Righto, after much messing around with custom driver config this seems to be working for me. It's just a local custom driver, so you need to save this code into a file called 'LocalValetDriver.php' in the root of your project. I will make a general Perch driver soon, as I have a lot of Perch projects I'll need to run on Valet.
I think this file is probably more complex than it needs to be, but I just wanted to get something which worked asap. The driver is effectively just the Valet basic driver but with code to ensure the $_SERVER['SERVER_NAME'] variable is properly set (it's not set by default), as Perch uses that variable to validate the licenses.
Hope it helps!
For anyone using Perch with Valet, I've cleaned up this driver and added it to Github, also made it a general Perch driver.
https://github.com/andocobo/perch-valet-driver