Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Setting up a new machine, I just discovered the procedural interface to SQLite3 seems to be gone:

PHP Fatal error: Call to undefined function sqlite3_open()

Is there any way to get that back again? I tried Google now for a couple of hours, but found no suitable solution so far. If possible, I don't want to rewrite a bunch of code which worked fine until now (changing it may break it ;) -- so any hints as to how to restore that functionality is highly welcome!

share|improve this question

You can easily write a wrapper, then continue using your old functions. Example:


class MyDB extends SQLite3
  function __construct($filename)

if (!is_defined('sqlite3_open')) {
  function sqlite3_open($filename, $mode = 0666, &$error_message)
    $db = new MyDB($filename);
share|improve this answer

Your Answer


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.