Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There is no apt-get install php5-sqlite3, as its refereed by php5-sqlite

thus, i did:

apt-get install sqlite3 and then apt-get install php5-sqlite

Restarted apache2.

When I run echo sqlite_libversion(); it returns 2.8.17.

I tried print_r(SQLite3::version()); and it gives an error: Class 'SQLite3' not found

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Sqlite3 comes as part of PHP 5.3.x. The packaged Debian version of of PHP5 in Debian Lenny is based on 5.2.6.

From a quick google search I don't see a way to backport this. To access sqlite3 functionality on 5.2.6 you can use PDO. If that is not acceptable, then you probably will need to find/use/build a backport of PHP.

share|improve this answer
1  
packages.debian.org/squeeze/php5 suggests the version in Debian Squeeze is new enough to have SQLite3 embedded, so you could backport that package. Bear in mind that you'll have to backport security updates by hand until Squeeze releases though. –  David North Aug 31 '10 at 20:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.