diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | UPGRADING | 2 | ||||
-rw-r--r-- | ext/pdo_sqlite/config.m4 | 4 | ||||
-rw-r--r-- | ext/pdo_sqlite/sqlite_driver.c | 4 | ||||
-rw-r--r-- | ext/sqlite3/config0.m4 | 6 | ||||
-rw-r--r-- | ext/sqlite3/sqlite3.c | 4 |
6 files changed, 8 insertions, 14 deletions
@@ -24,9 +24,11 @@ PHP NEWS - PDO_SQLite: . Implemented sqlite_stmt_readonly in PDO_SQLite. (BohwaZ) + . Lifted requirements to SQLite 3.5.0. (cmb) - SQLite3: . Unbundled libsqlite. (cmb) + . Lifted requirements to SQLite 3.5.0. (cmb) - Standard: . Fixed bug #74764 (Bindto IPv6 works with file_get_contents but fails with @@ -112,7 +112,7 @@ PHP 7.4 UPGRADE NOTES - SQLite3: . The bundled libsqlite has been removed. To build the SQLite3 and/or - PDO_SQLite extensions a system libsqlite3 ≥ 3.3.9 is now required. + PDO_SQLite extensions a system libsqlite3 ≥ 3.5.0 is now required. - Zip: . The bundled libzip library has been removed. A system libzip >= 0.11 is now diff --git a/ext/pdo_sqlite/config.m4 b/ext/pdo_sqlite/config.m4 index cb3e7d5afc..201f9f24bf 100644 --- a/ext/pdo_sqlite/config.m4 +++ b/ext/pdo_sqlite/config.m4 @@ -52,14 +52,14 @@ if test "$PHP_PDO_SQLITE" != "no"; then PHP_ADD_INCLUDE($PDO_SQLITE_DIR/include) LIBNAME=sqlite3 - LIBSYMBOL=sqlite3_open + LIBSYMBOL=sqlite3_open_v2 PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, [ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PDO_SQLITE_DIR/$PHP_LIBDIR, PDO_SQLITE_SHARED_LIBADD) AC_DEFINE(HAVE_PDO_SQLITELIB,1,[ ]) ],[ - AC_MSG_ERROR([wrong sqlite lib version or lib not found]) + AC_MSG_ERROR([wrong sqlite lib version (< 3.5.0) or lib not found]) ],[ -L$PDO_SQLITE_DIR/$PHP_LIBDIR -lm ]) diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 2cc7f72475..811f43c268 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -809,11 +809,7 @@ static int pdo_sqlite_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{ flags = pdo_attr_lval(driver_options, PDO_SQLITE_ATTR_OPEN_FLAGS, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE); -#if SQLITE_VERSION_NUMBER >= 3005000 i = sqlite3_open_v2(filename, &H->db, flags, NULL); -#else - i = sqlite3_open(filename, &H->db); -#endif efree(filename); diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4 index 6d6fb88f55..98495da300 100644 --- a/ext/sqlite3/config0.m4 +++ b/ext/sqlite3/config0.m4 @@ -33,14 +33,14 @@ if test $PHP_SQLITE3 != "no"; then AC_MSG_ERROR([Please reinstall the sqlite distribution from http://www.sqlite.org]) fi - AC_MSG_CHECKING([for SQLite 3.3.9+]) - PHP_CHECK_LIBRARY(sqlite3, sqlite3_prepare_v2, [ + AC_MSG_CHECKING([for SQLite 3.5.0+]) + PHP_CHECK_LIBRARY(sqlite3, sqlite3_open_v2, [ AC_MSG_RESULT(found) PHP_ADD_LIBRARY_WITH_PATH(sqlite3, $SQLITE3_DIR/$PHP_LIBDIR, SQLITE3_SHARED_LIBADD) PHP_ADD_INCLUDE($SQLITE3_DIR/include) ],[ AC_MSG_RESULT([not found]) - AC_MSG_ERROR([Please install SQLite 3.3.9 first or check libsqlite3 is present]) + AC_MSG_ERROR([Please install SQLite 3.5.0 first or check libsqlite3 is present]) ],[ -L$SQLITE3_DIR/$PHP_LIBDIR -lm ]) diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index c91aec17cd..2abf99f4eb 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -131,11 +131,7 @@ PHP_METHOD(sqlite3, open) fullpath = filename; } -#if SQLITE_VERSION_NUMBER >= 3005000 rc = sqlite3_open_v2(fullpath, &(db_obj->db), flags, NULL); -#else - rc = sqlite3_open(fullpath, &(db_obj->db)); -#endif if (rc != SQLITE_OK) { zend_throw_exception_ex(zend_ce_exception, 0, "Unable to open database: %s", #ifdef HAVE_SQLITE3_ERRSTR |