Forum
License Invalid On Laravel Valet Testing Domain
Hi, I've been trying to work with some Perch sites in the Laravel Valet development environment. I've been running into the same issue as another user has had recently, Perch won't recognise the development domain as valid.
I thought the problem must be that Laravel Valet doesn't set the $_SERVER['SERVER_NAME'] variable (I see that is sent to the Perch servers for verification), so I created a custom driver and ensured that was set correctly - it still wouldn't recognise the domain though. I echoed out the $_SERVER['SERVER_NAME'] variable on the admin login page to ensure it was being set correctly on that specific request, it was.
PHP errors / warnings are:
Warning: Illegal string offset 'key' in /Users/Andrew/Code/jardiniperch/perch/core/lib/PerchAuthenticatedUser.class.php on line 192
Warning: Illegal string offset 'host' in /Users/Andrew/Code/jardiniperch/perch/core/lib/PerchAuthenticatedUser.class.php on line 193
Warning: Illegal string offset 'version' in /Users/Andrew/Code/jardiniperch/perch/core/lib/PerchAuthenticatedUser.class.php on line 194
Warning: Illegal string offset 'php' in /Users/Andrew/Code/jardiniperch/perch/core/lib/PerchAuthenticatedUser.class.php on line 195
Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /Users/Andrew/Code/jardiniperch/perch/core/lib/PerchAuthenticatedUser.class.php on line 196`
Debug info:
Debug Message
Activating via CURL
{"result":"FAILURE"}
Activation: failed
Writing auth fail to log.
[22] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Queries: 1
Memory: 1.3745
Array
(
[type] => 2
[message] => http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given
[file] => /Users/Andrew/Code/jardiniperch/perch/core/lib/PerchAuthenticatedUser.class.php
[line] => 196
)
Form validation message (I added the environment variable to confirm it was being set correctly):
Sorry, your license key isn't valid for this domain. jardiniperch.dev
Any help with this is very much appreciated.
Cheers, Andrew
I sorted it out, in addition to creating the custom driver I also had to update Perch - obviously!
Thanks!