Donc voilà : j'ai ma base "sqlite.db" et j'ai tenté une connexion sur mon serveur Debian et en local.
LOCAL
<?php
$dbname='base';
if(!class_exists('SQLite3'))
die("SQLite 3 <b>n'est pas</b> supporté !");
$base=new SQLite3($dbname, 0666);
echo "SQLite 3 est supporté.";
?>
Ce qui m'afficheSQLite 3 est supporté.
(donc très bien !)Sauf que j'aimerais qu'elle fonctionne sur le serveur ...
DEBIAN
- Essai 1 :
Code
<?php
$dbname='base';
$base=new SQLiteDatabase($dbname, 0666, $err);
if ($err)
die("SQLite NOT supported.");
echo "SQLite supported.";
?>
RésultatFatal error: Uncaught exception 'SQLiteException' with message 'SQLiteDatabase::__construct() [sqlitedatabase.--construct]: unable to open database: base' in test.php:3 Stack trace: #0 test.php(3): SQLiteDatabase->__construct('base', 438, 'unable to open ...') #1 {main} thrown in test.php on line 3
- Essai 2 :
Code
<?php
$dbname='base';
if(!class_exists('SQLite3'))
die("SQLite 3 <b>n'est pas</b> supporté !");
$base=new SQLite3($dbname, 0666);
echo "SQLite 3 est supporté.";
?>
RésultatFatal error: Uncaught exception 'Exception' with message 'Unable to open database: unable to open database file' in test.php:6 Stack trace: #0 test.php(6): SQLite3->__construct('base', 438) #1 {main} thrown in test.php on line 6
Besoin d'aide s'il vous plait
Merci !