php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #75662 pdo sqlite is not compiled with SQLITE_ENABLE_FTS3_PARENTHESIS
Submitted: 2017-12-10 11:48 UTC Modified: 2018-09-23 19:33 UTC
From: mesa57 at hotmail dot com Assigned:
Status: Closed Package: PDO SQLite
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
 [2017-12-10 11:48 UTC] mesa57 at hotmail dot com
Description:
------------
pdo sqlite is not compiled with SQLITE_ENABLE_FTS3_PARENTHESIS

Verify with sql : PRAGMA compile_options;

 



Test script:
---------------
<?php
// Any SQLite3 database will do
$dbh = new PDO('sqlite:d:/sqlite/spotweb.db');
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = 'PRAGMA compile_options;';
$stm = $dbh->query($sql);
$lst = $stm->fetchAll();
var_dump($lst);    
?>

Actual result:
--------------
For php 71 this outputs :

array(7) {
  [0] =>
  array(2) {
    'compile_option' =>
    string(18) "COMPILER=msvc-1900"
    [0] =>
    string(18) "COMPILER=msvc-1900"
  }
  [1] =>
  array(2) {
    'compile_option' =>
    string(22) "ENABLE_COLUMN_METADATA"
    [0] =>
    string(22) "ENABLE_COLUMN_METADATA"
  }
  [2] =>
  array(2) {
    'compile_option' =>
    string(11) "ENABLE_FTS3"
    [0] =>
    string(11) "ENABLE_FTS3"
  }
  [3] =>
  array(2) {
    'compile_option' =>
    string(11) "ENABLE_FTS4"
    [0] =>
    string(11) "ENABLE_FTS4"
  }
  [4] =>
  array(2) {
    'compile_option' =>
    string(11) "ENABLE_FTS5"
    [0] =>
    string(11) "ENABLE_FTS5"
  }
  [5] =>
  array(2) {
    'compile_option' =>
    string(13) "SYSTEM_MALLOC"
    [0] =>
    string(13) "SYSTEM_MALLOC"
  }
  [6] =>
  array(2) {
    'compile_option' =>
    string(12) "THREADSAFE=0"
    [0] =>
    string(12) "THREADSAFE=0"
  }
}





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-23 17:04 UTC] cmb@php.net
Note that we're not unlikely to unbundle libsqlite[1] for PHP 7.4,
so we wouldn't even be able to set certain compile time options.
But even if we keep the bundled libsqlite, it doesn't make too
much sense to use a certain feature set, since distros usually
don't use our bundled libsqlite, and as such might use completely
different features.  Either way, if you need certain features,
it's probably best to build your own specialized libsqlite, and to
build PHP against that.

[1] <https://externals.io/message/103167>
 [2018-09-23 19:33 UTC] mesa57 at hotmail dot com
-Status: Open +Status: Closed
 [2018-09-23 19:33 UTC] mesa57 at hotmail dot com
Ok, thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 00:01:27 2024 UTC