title: PHP include in a cron job
body: <p>I'm trying to setup a PHP file as a cron job, where that PHP file includes other PHP files.</p>
  
  <p>The file itself is located at /var/www/vhosts/domain.com/httpdocs/app/protected/classes/cron/runner.php</p>
  
  <p>The include file is at 
  /var/www/vhosts/domain.com/httpdocs/app/protected/config.php</p>
  
  <p>How do I include that config file from runner.php? I tried doing require_once('../../config.php') but it said the file didn't exist.. I presume the cron runs PHP from a different location or something.</p>
  
  <p>The cron job is the following..</p>
  
  <p>/usr/bin/php -q /var/www/vhosts/domain.com/httpdocs/app/protected/classes/cron/runner.php</p>
  
  <p>Any thoughts?</p>