I’m not sure if my server has sqlite on it, so I want to use a PDO object to test and see if the server supports sqlite. I tried:
<?php
echo `sqlite3 -v`;
got the following error: Warning: shell_exec() has been disabled for security reasons
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could just use function_exists() to check if sqlite functions are present, like this:
For
SQLite3the former won’t work, so use this instead (courtesy of Prid’s comment):