How do I know if PHP is compiled with SQLite support? If it's not, and I don't have the privileges to change it, what alternatives do I have to read an SQLite database besides access to php-sqlite3 functions?
phpinfo();
should tell you what's compiled in. Execute that:
<?php
phpinfo();
?>
and look for sqlite within the HTML output.
if you got command line php, do this:
php -m
SQLite should then be in the list.
If it is not there then I believe your out of luck (but I'am not sure)
If you do not have sqllite support built in to php, and cannot build it as an extension, you could always try the pear extension http://pear.php.net/package/MDB2.
I have not used it myself, but it claims to support sqllite http://pear.php.net/package/MDB2_Driver_sqlite/
I see that you specifically ask for SQLite v.3 support, so what you have to check is PDO
and PDO_sqlite
support. The native php_sqlite
extension only supports SQLite v.2 in PHP 5 to 5.2. PHP 5.3 has a native php_sqlite3
extension, but I guess this is not your case, as it has been released just yesterday.
I believe you're out of luck if your setup doesn't include that, as the suggested PEAR MDB2 is just an abstraction layer over existing drivers, it does not substitute them.