mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-07 08:05:25 +02:00
added extension loading. please note the additional variable '
$load_extensions = "";' within config.php. git-svn-id: file:///svn/phpbb/trunk@3528 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
74c6eec725
commit
46267dce88
@ -44,6 +44,17 @@ if (!defined('PHPBB_INSTALLED'))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load Extensions
|
||||||
|
if ( (isset($load_extensions)) && ($load_extensions != '') )
|
||||||
|
{
|
||||||
|
$load_extensions = explode(',', $load_extensions);
|
||||||
|
|
||||||
|
for ($i = 0; $i < count($load_extensions); $i++)
|
||||||
|
{
|
||||||
|
@dl(trim($load_extensions[$i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Include files
|
// Include files
|
||||||
require($phpbb_root_path . 'includes/acm/cache_' . $acm_type . '.'.$phpEx);
|
require($phpbb_root_path . 'includes/acm/cache_' . $acm_type . '.'.$phpEx);
|
||||||
require($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
|
require($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
|
||||||
|
@ -493,6 +493,8 @@ else if ( ( empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$load_extensions = '';
|
||||||
|
|
||||||
//
|
//
|
||||||
// Go ahead and create the DB, then populate it
|
// Go ahead and create the DB, then populate it
|
||||||
//
|
//
|
||||||
@ -534,7 +536,40 @@ else
|
|||||||
);
|
);
|
||||||
$template->pparse('body'); */
|
$template->pparse('body'); */
|
||||||
|
|
||||||
die("Error during installation: no $check_exts extension");
|
// Try to load the Extensions
|
||||||
|
$loaded_extension = FALSE;
|
||||||
|
|
||||||
|
if ( (!@ini_get('safe_mode')) && (@ini_get('enable_dl')) )
|
||||||
|
{
|
||||||
|
$suffix = ( (defined('PHP_OS')) && (eregi('win', PHP_OS)) ) ? '.dll' : '.so';
|
||||||
|
|
||||||
|
if (!@extension_loaded($check_exts))
|
||||||
|
{
|
||||||
|
if (@dl($check_exts . $suffix))
|
||||||
|
{
|
||||||
|
$load_extensions .= ($load_extensions == '') ? $check_exts . $suffix : ',' . $check_exts . $suffix;
|
||||||
|
$loaded_extension = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$loaded_extension)
|
||||||
|
{
|
||||||
|
if (!@extension_loaded($check_other))
|
||||||
|
{
|
||||||
|
if (@dl($check_other . $suffix))
|
||||||
|
{
|
||||||
|
$load_extensions .= ($load_extensions == '') ? $check_other . $suffix : ',' . $check_other . $suffix;
|
||||||
|
$loaded_extension = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$loaded_extension)
|
||||||
|
{
|
||||||
|
die("Error during installation: no $check_exts extension");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include($phpbb_root_path . 'db/' . $dbms . '.' . $phpEx);
|
include($phpbb_root_path . 'db/' . $dbms . '.' . $phpEx);
|
||||||
@ -542,6 +577,24 @@ else
|
|||||||
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add another Extension Checks here if you want, please do not specify the suffix
|
||||||
|
$check_extensions = array();
|
||||||
|
$suffix = ( (defined('PHP_OS')) && (eregi('win', PHP_OS)) ) ? '.dll' : '.so';
|
||||||
|
|
||||||
|
for ($i = 0; $i < count($check_extensions); $i++)
|
||||||
|
{
|
||||||
|
if (!@extension_loaded($check_extensions[$i]))
|
||||||
|
{
|
||||||
|
if ( (!@ini_get('safe_mode')) && (@ini_get('enable_dl')) )
|
||||||
|
{
|
||||||
|
if (@dl($check_extensions[$i] . $suffix))
|
||||||
|
{
|
||||||
|
$load_extensions .= ($load_extensions == '') ? $check_extensions[$i] . $suffix : ',' . $check_extensions[$i] . $suffix;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$dbms_schema = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_schema.sql';
|
$dbms_schema = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_schema.sql';
|
||||||
$dbms_basic = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_basic.sql';
|
$dbms_basic = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_basic.sql';
|
||||||
|
|
||||||
@ -694,6 +747,7 @@ else
|
|||||||
$config_data .= '$dbpasswd = "' . $dbpasswd . '";' . "\n\n";
|
$config_data .= '$dbpasswd = "' . $dbpasswd . '";' . "\n\n";
|
||||||
$config_data .= "\$acm_type = 'file';\n";
|
$config_data .= "\$acm_type = 'file';\n";
|
||||||
$config_data .= '$table_prefix = "' . $table_prefix . '";' . "\n\n";
|
$config_data .= '$table_prefix = "' . $table_prefix . '";' . "\n\n";
|
||||||
|
$config_data .= '$load_extensions = "' . $load_extensions . '";' . "\n\n";
|
||||||
$config_data .= 'define(\'PHPBB_INSTALLED\', true);'."\n\n";
|
$config_data .= 'define(\'PHPBB_INSTALLED\', true);'."\n\n";
|
||||||
$config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
|
$config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user