mercredi 8 avril 2015

How to install Sqlite PHP 5.3

I have PHP 5.3 on a ubuntu machine & I cant figure out how to get SQLite3 enabled. I was told it is installed by default but I dont see it. I know it isn't enabled also since I get the following error:



PHP Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /file.php:65
Stack trace:
#0 /file(65): PDO->__construct('sqlite:banks.db')


I also tried the following



sudo apt-get install sqlite php5-sqlite
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libsqlite0
Suggested packages:
sqlite-doc
The following NEW packages will be installed:
libsqlite0 php5-sqlite sqlite
0 upgraded, 3 newly installed, 0 to remove and 47 not upgraded.
Need to get 27.6 kB/234 kB of archives.
After this operation, 627 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://ift.tt/x7aQTN precise-updates/main php5-sqlite amd64 5.3.10-1ubuntu3.13
404 Not Found [IP: 91.189.91.23 80]
Err http://ift.tt/unqOyP precise-security/main php5-sqlite amd64 5.3.10-1ubuntu3.13
404 Not Found [IP: 91.189.92.200 80]
Failed to fetch http://ift.tt/1FmmAnU 404 Not Found [IP: 91.189.92.200 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Here are my PHP modules



php -m
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/memcache.so' - /usr/lib/php5/20090626/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
memcached
mhash
openssl
pcntl
pcre
PDO
pdo_pgsql
pgsql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

Aucun commentaire:

Enregistrer un commentaire