Hallo folgendes Problem:
Ich habe php installiert mit php-sqlite. Die jeweilige Ziel ist in der php.ini auch unkommentiert also: pdo_sqlite.so und sqlite3.so ... Dennoch scheint php pdo_sqlite nicht zu laden. Hier ist mein Testscript:
<?php
$dbhandler = sqlite_open('test.sqlite', 0666, $error);
if (!$dbhandler) die ($error);
$query = "SELECT * FROM user;";
$result = sqlite_query($dbhandler, $query, SQLITE_NUM);
if (!$result) die ("Cannot contact the sqlite database");
while (sqlite_has_more($result)){
$row = sqlite_fetch_array_($result);
echo "table: $row[0], SQL $row[1]";
echo "<br>";
}
sqlite_close($dbhandler);
?>
`php -m` sagt das hier:
[PHP Modules]
Core
ctype
curl
date
dom
ereg
fileinfo
filter
gettext
hash
json
libxml
mbstring
mhash
mysqlnd
pcntl
pcre
PDO
pdo_sqlite
readline
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
Und `php -S 127.0.0.1:8080 -t .` zum testen sagt das hier:
PHP 5.6.10 Development Server started at Fri Jun 19 18:29:36 2015
Listening on http://127.0.0.1:8080
Document root is /home/user/test
Press Ctrl-C to quit.
[Fri Jun 19 18:29:37 2015] PHP Fatal error: Call to undefined function sqlite_open() in /home/user/test/test.php on line 2
[Fri Jun 19 18:29:37 2015] 127.0.0.1:37169 [500]: /test.php - Call to undefined function sqlite_open() in /home/user/test/test.php on line 2