I am on a corporate hosting solution, and trying to test for the existence of sqlite. I am running the following code:
<?php
echo sqlite_libversion(), "\n", phpversion();
?>
But I am getting a blank page. I know PHP is running because phpinfo() is successful, however this is not enough to tell me if sqlite is running as the sqlite.ini is present in phpinfo() but can’t find any other information.
I am accessing the server via FTP and am locked into the web-root. Does anyone know why phpversion() and sqlite_libversion() are returning nothing?
If the SQLite is not available, the
sqlite_libversion()function will not even exist and will just throw a PHP error:You need to use function_exists() to test if the function is actually there.
Additionally, you should configure error reporting so you can actually see error messages. You have several ways to do so:
Edit your
php.inifile:Put this on top of your script:
If PHP runs as Apache module, you can also use an
.htaccessfile:Update:
What do you get if you run this code and nothing else?