• Article for your preferred language does not exist. Below is international version of the article.

Article ID: 119404, created on Dec 28, 2013, last review on May 11, 2014

  • Applies to:
  • Plesk Automation 11.5

Symptoms

Domain uses PHP 5.3, when I try to browse any php page, I got the following error:

    Fatal error: Call to undefined function sqlite_escape_string() in /var/www/vhosts/domain.tld/httpdocs/include/SB/Modules/Storage/Db/Adapter/Sqlite.php on line 764 

Cause

The most possible reason that domain uses sqlite 2 module, but it is not installed on the server.

Resolution

  1. Check that Sqlite 2 is enabled:

    # php -i | grep -i sqlite
    PDO drivers => mysql, sqlite
    pdo_sqlite
    PDO Driver for SQLite 3.x => enabled
    SQLite Library => 3.7.9
    sqlite3
    SQLite3 support => enabled
    SQLite3 module version => 0.7-dev
    SQLite Library => 3.7.9
    sqlite3.extension_dir => no value => no value
    

From example above, Sqlite 3 is enabled only.

  1. To enable Sqlite 2, please download php53-sqlite2 depending on architecture (for example, for 64 bit system it is php53-sqlite2-5.3.2-11011812.x86_64.rpm).

  2. Extract sqlite.so from RPM or install it if it is possible:

    # rpm2cpio php53-sqlite2-5.3.2-11011812.x86_64.rpm | cpio -idmv
    ./etc/php.d
    ./etc/php.d/sqlite.ini
    ./usr/lib64
    ./usr/lib64/php
    ./usr/lib64/php/modules
    ./usr/lib64/php/modules/sqlite.so
    
    
    # cp ./usr/lib64/php/modules/sqlite.so /usr/lib64/php/modules/
    
    
    # cat /etc/php.d/sqlite.ini
    ; Enable sqlite extension module
    extension=sqlite.so
    
  3. Make sure that Sqlite 2 is enabled:

    # php -i | grep -i sqlite
    PDO drivers => mysql, sqlite, sqlite2
    pdo_sqlite
    PDO Driver for SQLite 3.x => enabled
    SQLite Library => 3.7.9
    Registered save handlers => files user sqlite
    SQLite
    SQLite support => enabled
    PECL Module version => 2.0-dev $Id: sqlite.c 293036 2010-01-03 09:23:27Z sebastian $
    SQLite Library => 2.8.17
    SQLite Encoding => UTF-8
    sqlite.assoc_case => 0 => 0
    sqlite3
    SQLite3 support => enabled
    SQLite3 module version => 0.7-dev
    SQLite Library => 3.7.9
    sqlite3.extension_dir => no value => no value
    

Search Words

large numbers of sites still down after upgrade BROKEN

33a70544d00d562bbc5b17762c4ed2b3 e0aff7830fa22f92062ee4db78133079 caea8340e2d186a540518d08602aa065

Email subscription for changes to this article
Save as PDF