mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Various install fixes, now produces a site at least.
This commit is contained in:
@@ -9,9 +9,9 @@
|
|||||||
* Database utilities
|
* Database utilities
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/db_table_admin_class.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_handlers/db_table_admin_class.php,v $
|
||||||
* $Revision: 1.14 $
|
* $Revision: 1.15 $
|
||||||
* $Date: 2009-12-01 20:05:53 $
|
* $Date: 2010-01-23 02:07:50 $
|
||||||
* $Author: e107steved $
|
* $Author: mcfly_e107 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -35,6 +35,10 @@ class db_table_admin
|
|||||||
function get_current_table($table_name, $prefix = "")
|
function get_current_table($table_name, $prefix = "")
|
||||||
{
|
{
|
||||||
global $sql;
|
global $sql;
|
||||||
|
if(!isset($sql))
|
||||||
|
{
|
||||||
|
$sql = new db;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$prefix)
|
if (!$prefix)
|
||||||
{
|
{
|
||||||
|
25
install_.php
25
install_.php
@@ -9,16 +9,16 @@
|
|||||||
* Installation file
|
* Installation file
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/install_.php,v $
|
* $Source: /cvs_backup/e107_0.8/install_.php,v $
|
||||||
* $Revision: 1.58 $
|
* $Revision: 1.59 $
|
||||||
* $Date: 2010-01-16 19:54:04 $
|
* $Date: 2010-01-23 02:07:50 $
|
||||||
* $Author: e107steved $
|
* $Author: mcfly_e107 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @package e107
|
* @package e107
|
||||||
* @subpackage install
|
* @subpackage install
|
||||||
* @version $Id: install_.php,v 1.58 2010-01-16 19:54:04 e107steved Exp $;
|
* @version $Id: install_.php,v 1.59 2010-01-23 02:07:50 mcfly_e107 Exp $;
|
||||||
*
|
*
|
||||||
* Installer base routine
|
* Installer base routine
|
||||||
*/
|
*/
|
||||||
@@ -47,6 +47,7 @@ $HELP_DIRECTORY = "e107_docs/help/";
|
|||||||
$CACHE_DIRECTORY = "e107_media/cache/";
|
$CACHE_DIRECTORY = "e107_media/cache/";
|
||||||
$DOWNLOADS_DIRECTORY = "e107_media/files/";
|
$DOWNLOADS_DIRECTORY = "e107_media/files/";
|
||||||
$UPLOADS_DIRECTORY = "e107_media/public/";
|
$UPLOADS_DIRECTORY = "e107_media/public/";
|
||||||
|
$LOGS_DIRECTORY = "e107_files/logs";
|
||||||
|
|
||||||
/* End configurable variables */
|
/* End configurable variables */
|
||||||
|
|
||||||
@@ -86,7 +87,9 @@ e107_ini_set('magic_quotes_sybase', 0);
|
|||||||
e107_ini_set('arg_separator.output', '&');
|
e107_ini_set('arg_separator.output', '&');
|
||||||
e107_ini_set('session.use_only_cookies', 1);
|
e107_ini_set('session.use_only_cookies', 1);
|
||||||
e107_ini_set('session.use_trans_sid', 0);
|
e107_ini_set('session.use_trans_sid', 0);
|
||||||
session_start();
|
|
||||||
|
define('MAGIC_QUOTES_GPC', (ini_get('magic_quotes_gpc') ? true : false));
|
||||||
|
|
||||||
|
|
||||||
$php_version = phpversion();
|
$php_version = phpversion();
|
||||||
if(version_compare($php_version, MIN_PHP_VERSION, "<"))
|
if(version_compare($php_version, MIN_PHP_VERSION, "<"))
|
||||||
@@ -151,10 +154,11 @@ function check_class($whatever)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$e107_paths = compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY', 'THEMES_DIRECTORY', 'PLUGINS_DIRECTORY', 'HANDLERS_DIRECTORY', 'LANGUAGES_DIRECTORY', 'HELP_DIRECTORY', 'CACHE_DIRECTORY', 'DOWNLOADS_DIRECTORY', 'UPLOADS_DIRECTORY', 'MEDIA_DIRECTORY');
|
$e107_paths = compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY', 'THEMES_DIRECTORY', 'PLUGINS_DIRECTORY', 'HANDLERS_DIRECTORY', 'LANGUAGES_DIRECTORY', 'HELP_DIRECTORY', 'CACHE_DIRECTORY', 'DOWNLOADS_DIRECTORY', 'UPLOADS_DIRECTORY', 'MEDIA_DIRECTORY', 'LOGS_DIRECTORY');
|
||||||
$e107 = e107::getInstance();
|
$e107 = e107::getInstance();
|
||||||
$e107->initInstall($e107_paths, realpath(dirname(__FILE__)));
|
$e107->initInstall($e107_paths, realpath(dirname(__FILE__)));
|
||||||
unset($e107_paths);
|
unset($e107_paths);
|
||||||
|
session_start();
|
||||||
|
|
||||||
function include_lan($path, $force = false)
|
function include_lan($path, $force = false)
|
||||||
{
|
{
|
||||||
@@ -200,9 +204,12 @@ class e_install
|
|||||||
{
|
{
|
||||||
$this->logFile = '';
|
$this->logFile = '';
|
||||||
if (MAKE_INSTALL_LOG)
|
if (MAKE_INSTALL_LOG)
|
||||||
|
{
|
||||||
|
if(is_writable(dirname(__FILE__)))
|
||||||
{
|
{
|
||||||
$this->logFile = dirname(__FILE__).'/e107InstallLog.log';
|
$this->logFile = dirname(__FILE__).'/e107InstallLog.log';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// $this->logLine('Query string: ');
|
// $this->logLine('Query string: ');
|
||||||
$this->template = new SimpleTemplate();
|
$this->template = new SimpleTemplate();
|
||||||
while (@ob_end_clean());
|
while (@ob_end_clean());
|
||||||
@@ -1123,6 +1130,7 @@ class e_install
|
|||||||
// Create the admin user - replacing any that may be been included in the XML.
|
// Create the admin user - replacing any that may be been included in the XML.
|
||||||
$ip = $_SERVER['REMOTE_ADDR'];
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
$userp = "1, '{$this->previous_steps['admin']['display']}', '{$this->previous_steps['admin']['user']}', '', '".md5($this->previous_steps['admin']['password'])."', '', '{$this->previous_steps['admin']['email']}', '', '', 0, ".time().", 0, 0, 0, 0, 0, '{$ip}', 0, '', 0, 1, '', '', '0', '', ".time().", ''";
|
$userp = "1, '{$this->previous_steps['admin']['display']}', '{$this->previous_steps['admin']['user']}', '', '".md5($this->previous_steps['admin']['password'])."', '', '{$this->previous_steps['admin']['email']}', '', '', 0, ".time().", 0, 0, 0, 0, 0, '{$ip}', 0, '', 0, 1, '', '', '0', '', ".time().", ''";
|
||||||
|
$qry = "REPLACE INTO {$this->previous_steps['mysql']['prefix']}user VALUES ({$userp})";
|
||||||
$this->dbqry("REPLACE INTO {$this->previous_steps['mysql']['prefix']}user VALUES ({$userp})" );
|
$this->dbqry("REPLACE INTO {$this->previous_steps['mysql']['prefix']}user VALUES ({$userp})" );
|
||||||
$this->logLine('Admin user created');
|
$this->logLine('Admin user created');
|
||||||
mysql_close($this->dbLink);
|
mysql_close($this->dbLink);
|
||||||
@@ -1507,7 +1515,10 @@ class e_install
|
|||||||
|
|
||||||
if(mysql_errno())
|
if(mysql_errno())
|
||||||
{
|
{
|
||||||
$this->debug_db_info['db_error_log'][] = 'Query Error [#'.mysql_errno().']: '.mysql_error()."\nQuery: {$qry}";
|
$errorInfo = 'Query Error [#'.mysql_errno().']: '.mysql_error()."\nQuery: {$qry}";
|
||||||
|
echo $errorInfo."<br />";
|
||||||
|
exit;
|
||||||
|
$this->debug_db_info['db_error_log'][] = $errorInfo;
|
||||||
//$this->debug_db_info['db_log'][] = $qry;
|
//$this->debug_db_info['db_log'][] = $qry;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user