I have Apache running on Debian with PHP 5.4.
PHP-cli is installed.
My directory structure for the web project is:
- /myproject
- /src
- /controller
- getProviders.php
- /model
- /public
- ClassLoader.php
I want to create a cron job to execute getProviders.php every 5 minutes. This is as far as I have come:*/5 * * * * /usr/bin/php /var/www/myproject/src/controller/getProviders.php
It doesn't work because I have a require_once in getProviders.php requiring ClassLoader.php, but he can't find it.require_once "../ClassLoader.php"
getProviders.php works when executed via URL.
I'm not new to PHP development, but new at configuring the server around it. What do I have to do to make it work. I'm guessing I have to set the include path, but I have no idea to what exactly.
Thanks in advance for your help.