-6

In this code :

echo "plop";
$bdd = new SQLite3("databaseSQLite.db") or die('Unable to open database');
echo "plop";

only the first "plop" appear, I am using PHP 5.4.44. How can I make SQLite3 work?

PDO doesn't work either.

$bdd = new PDO('sqlite:database.sql');
François MENTEC
  • 1,150
  • 4
  • 12
  • 25
  • 3
    Are you displaying PHP error messages? see [get-php-errors-to-display](http://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display). I also tend to store all data files in an `application data directory` rather than the `current directory.` I define a constant `APP_DATA_DIR` with the full path to the directory. i.e `$bdd = new SQLite3(APP_DATA_DIR ."/databaseSQLite.db")` – Ryan Vincent Sep 16 '15 at 14:05
  • 4
    If you'd like help instead of downvotes, follow these [guidelines](http://stackoverflow.com/help/how-to-ask). – ciruvan Sep 16 '15 at 14:16

1 Answers1

1

Thanks Ryan Vincent, displaying errors shows me SQLite wasn't installed, (thinked it was always installed with php >= 5.3). apt-get install php5-sqlite fix it.

François MENTEC
  • 1,150
  • 4
  • 12
  • 25