title: cronjob execution php error
body: <p>Im trying to create cronjob from php, I added it to crotanb:</p>
  
  <p>sudo crontab -u www-data -l:</p>
  
  <pre><code>*/1 * * * * /usr/bin/php /var/www/html/service_script/cronTest.php
  </code></pre>
  
  <p>cronTest.php</p>
  
  <pre><code>&lt;?php
  echo 'it works';
  include_once('../core/external_init.php');
  </code></pre>
  
  <p>And this is the output:</p>
  
  <pre><code>it works
  
  PHP Warning:  include_once(../core/external_init.php): failed to open stream: No such file or directory in /var/www/html/service_script/cronTest.php on line 3
  
  PHP Warning:  include_once(): Failed opening '../core/external_init.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/service_script/cronTest.php on line 3
  
  PHP Fatal error:  Uncaught Error: Class 'pluginClassManagement' not found in /var/www/html/service_script/cronTest.php:6
  
  Stack trace:
  #0 {main}
    thrown in /var/www/html/service_script/cronTest.php on line 6
  </code></pre>
  
  <p>This cronTest.php works when I run it from browser.
  If I change /usr/bin/php to /usr/lib/php I get this error instead:</p>
  
  <pre><code>/bin/sh: 1: /usr/lib/php: Permission denied
  </code></pre>
  
  <p>I dont really know what path should be here.</p>
  
  <p>I have php7, i tried all kinds of thing to make this work, setting rights, make the script executable etc but now Im stuck on this and dont know what to do anymore</p>