This page runs Dotkernel Frontend in a virtual host on WSL. It also covers the two local-only fixes: clearing a stale configuration cache and turning off secure session cookies.
We recommend running your applications in WSL:
$baseUrl in config/autoload/local.php to the address of the virtualhost.You should see the Dotkernel Frontend welcome page.
If you are getting exceptions or errors regarding some missing services, try running the following command:
sudo php bin/clear-config-cache.php
If
config-cache.phpis present that config will be loaded regardless of theConfigAggregator::ENABLE_CACHEinconfig/autoload/mezzio.global.phpDevelopment only:
session.cookie_securedoes not work locally so make sure you modify yourlocal.php, as per the following:
# other code
return [
# other configurations...
'session_config' => [
'cookie_secure' => false,
],
];
Do not change this in local.php.dist as well because this value should remain true on production.
A: The $baseUrl value in config/autoload/local.php, which is http://dotkernel.local by default.
Set it to the address of your virtual host.
A: Yes, for a quick look. composer serve starts PHP's built-in server on port 8080 (php -S 0.0.0.0:8080 -t public/).
Set $baseUrl to match.
A: session_config => cookie_secure is true, so the browser sends the session cookie only over HTTPS.
Set it to false in your local.php when you develop over plain HTTP.
A: A configuration cache is being loaded.
Enable development mode, or run php bin/clear-config-cache.php.