From e3af3015231c9c8baf58f55081b2068d2dad89b0 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Thu, 18 Jun 2009 12:56:59 +0000 Subject: [PATCH] Finally stop this annoyance, if PDO is shared module it must be loaded for the SQLite extension to work git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9618 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/functions_install.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index afa25c6548..2c8fc97731 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -119,6 +119,7 @@
  • [Fix] Do not display "View user notes" and "Warn user" links in user profile if corresponding MCP modules are disabled. (Bug #10519 - Patch by rxu)
  • [Fix] Empty error message in UCP folder management when creating folder without name (Bug #39875 - Patch by nickvergessen)
  • [Fix] Wrong description in UCP group managment implicates missing feature (Bug #19945 - Patch by nickvergessen)
  • +
  • [Fix] Do not throw an error when PDO is a shared module and not loaded preventing SQLite from being loaded.
  • [Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.
  • [Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)
  • [Change] Template engine now permits to a limited extent variable includes.
  • diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index 611b0a7bc3..42b9b4e318 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -21,6 +21,12 @@ if (!defined('IN_PHPBB')) */ function can_load_dll($dll) { + // SQLite2 is a tricky thing, from 5.0.0 it requires PDO; if PDO is not loaded we must state that SQLite is unavailable + // as the installer doesn't understand that the extension has a prerequisite. + if ($dll == 'sqlite' && version_compare(PHP_VERSION, '5.0.0', '>=') && !extension_loaded('pdo')) + { + return false; + } return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && function_exists('dl') && @dl($dll . '.' . PHP_SHLIB_SUFFIX)) ? true : false; }