title: Create SQLite file in PHP for iOS and Android
body: <p>I am trying to create a SQLite database file for iOS and Android. However, I am running into an issue I have, so far, not been able to solve.</p>
  
  <p>Point is, I know how to create a SQLite database on both devices, and I know how to do it in PHP, but somehow they cannot read each-others databases.</p>
  
  <p>How I create/open the sqlite file in php:</p>
  
  <pre><code>$dbhandle = sqlite_open('icddb.sqlite', 0777, $error);
  </code></pre>
  
  <p>I do queries like this:</p>
  
  <pre><code>sqlite_exec($dbhandle,$query);
  </code></pre>
  
  <p>When I put the filled database to iOS, this message is displayed:</p>
  
  <pre><code>file is encrypted or is not a database
  </code></pre>
  
  <p>How can this be solved? I have same problem when I create the SQLite file with firefox plugin 'SQLite Manager'</p>
  
  <p>Note: PHP is in any case able to open the SQLite file.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Apparently the latest stable PHP version creates a SQLite v2 file instead of a v3, which is used by all other. This probably is also my fix.</p>