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
This commit is contained in:
Chris Smith 2009-06-18 12:56:59 +00:00
parent a4e817e322
commit e3af301523
2 changed files with 7 additions and 0 deletions

View file

@ -119,6 +119,7 @@
<li>[Fix] Do not display &quot;View user notes&quot; and &quot;Warn user&quot; links in user profile if corresponding MCP modules are disabled. (Bug #10519 - Patch by rxu)</li>
<li>[Fix] Empty error message in UCP folder management when creating folder without name (Bug #39875 - Patch by nickvergessen)</li>
<li>[Fix] Wrong description in UCP group managment implicates missing feature (Bug #19945 - Patch by nickvergessen)</li>
<li>[Fix] Do not throw an error when PDO is a shared module and not loaded preventing SQLite from being loaded.</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
<li>[Change] Template engine now permits to a limited extent variable includes.</li>

View file

@ -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;
}