Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reliable way of linking to kirby folder & kirby bootstrap file #2

Open
bvdputte opened this issue Apr 12, 2019 · 1 comment
Open

Reliable way of linking to kirby folder & kirby bootstrap file #2

bvdputte opened this issue Apr 12, 2019 · 1 comment

Comments

@bvdputte
Copy link
Owner

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.

@adamkiss
Copy link

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";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants