Open bvdputte opened 5 years ago
One solution, at least for the cron usage, would be setting the cron with an argument, like /var/whatever/worker.php /../path/to/root/
, and then using the (optional) argument when requiring bootstrap.php
, like this:
$kirbyPath = __DIR__ . (count($argv) > 1 ? $argv[1] : '/../../../../');
require "{$kirbyPath}kirby/bootstrap.php";
In
worker.php
,bootstrap.php
and the path to the Kirby folder are based on the default locations and cannot be altered.This will give problems to people who have a non-default folder setup, or use composer.
Find a way to make this better.