title: Run php in a bash script: error "Could not open input file"
body: <p>I made a simple script like:</p>
  
  <pre><code>#!/bin/bash
  php /var/www/mysite/script1.php
  php /var/www/mysite/script2.php
  </code></pre>
  
  <p>When I run it as root like this:</p>
  
  <pre><code>bash update.sh
  </code></pre>
  
  <p>I get following errors:</p>
  
  <pre><code>Could not open input file: /var/www/mysite/script1.php
  Could not open input file: /var/www/mysite/script2.php
  </code></pre>
  
  <p>What is wrong ? I tried with permissions 777 on my php files and all folders to access it. When I do directly php /var/www/mysite/script1.php in my command line it works fine.</p>