Xem bài viết
Cũ 17-09-2008   #10
Ảnh thế thân của MrLuck™
MrLuck™
-=[ Tiên Phong Đầu Lĩnh ]=-
♠ Quậy Phá Bang ♠.
Gia nhập: 15-07-2003
Bài viết: 8.166
Điểm: 1358
L$B: 150.262
Tâm trạng:
MrLuck™ đang offline
 
Trích dẫn:
Nguyên văn gởi bởi HeoSuaXongDzoLua Xem bài viết
Em thực hành làm forum theo hướng dẫn của Sổ tay vBulletin 1.2

Khi đến phần
Trích dẫn:
II.1 Bước 1: Tải file lên server
Tạo một thư mục trên server của bạn dùng để chứ file chương trình. Vd, nếu bạn muốn truy cập vào forum thông qua địa chỉ ‘http://www.domain.com/forum’, hãy tạo một thư mục con tên là ‘forum’ trong thư mục ‘public_html’ hoặc ‘www’ của webserver.
Giải nén file chương trình. Mở thư mục 'upload/includes/'. Trong thư mục này bạn sẽ tìm thấy file ‘config.php.new’. Bạn phải đổi tên file này thành ‘config.php’ và mở nó bằng một trình biên soạn PHP (notePad chẳng hạn ^_^ ).

File này có chú thích rất rõ ràng, bạn chỉ cần làm theo hướng dẫn để khai báo các thông số cần thiết cho vB. Trong hầu hết các trường hợp, các thông số bạn cần lưu tâm là:
Tên của database dùng để cài đặt và sử dụng vB:



User name, password kết nối vào Dabase:

Trích dẫn:
$config['MasterServer']['username'] = 'root';
$config['MasterServer']['password'] = '123456';
Tiếp đầu ngữ cho mỗi table, dành cho trường hợp bạn cài nhiều phiên bản trên cùng một Database, prefix sẽ giúp cho các table không trùng tên:

Trích dẫn:
$config['Database']['tableprefix'] = '';
Email của nhà quản trị website, trong trường hợp vB bị sự cố nào đó trong quá trình hoạt động, thông báo sẽ được gởi đến địa chỉ email này:

Trích dẫn:
$config['Database']['technicalemail'] = '[email protected]';
em đã làm theo yêu cầu nhưng khi
Trích dẫn:
Bật trình duyệt và chạy trình cài đặt bằng cách gõ URL vào thanh địa chỉ của trình duyệt. Vd, nếu bạn tạo thư mục có cấu trúc như bước 1, hãy gõ vào http://www.domain.com/forum/install/install.php, thay ‘domain.com’ bằng địa chỉa website của bạn. hoặc http://localhost/forum/install/install.php (chạy trên localhost)
thì nó ko ra bước tiếp theo . Và báo lỗi như sau :

Trích dẫn:
Deprecated: Assigning the return value of new by reference is deprecated in C:\AppServ\www\forum\install\init.php on line 44

Deprecated: Assigning the return value of new by reference is deprecated in C:\AppServ\www\forum\install\init.php on line 74Deprecated: Assigning the return value of new by reference is deprecated in C:\AppServ\www\forum\install\init.php on line 82
Deprecated: Assigning the return value of new by reference is deprecated in C:\AppServ\www\forum\install\init.php on line 162

Deprecated: Assigning the return value of new by reference is deprecated in C:\AppServ\www\forum\install\init.php on line 174

Deprecated: Assigning the return value of new by reference is deprecated in C:\AppServ\www\forum\includes\class_core.php on line 2468

Fatal error: Call to undefined function get_magic_quotes_gpc() in C:\AppServ\www\forum\includes\class_core.php on line 1595
File init.php ( em ko biết cách up lên diễn đàn - hay là box này ko cho up ? - mới gia nhập nên ko rành T_T ) có code sau ( phiên bản vbb_3.7.5 ):
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.7.0 Beta 5
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000-2008 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

if (!defined('VB_AREA') AND !defined('THIS_SCRIPT'))
{
    echo 
'VB_AREA or THIS_SCRIPT must be defined to continue';
    exit;
}

if (isset(
$_REQUEST['GLOBALS']) OR isset($_FILES['GLOBALS']))
{
    echo 
'Request tainting attempted.';
    exit;
}

// set the current unix timestamp
define('TIMENOW'time());
define('SAPI_NAME'php_sapi_name());
define('SAFEMODE', (@ini_get('safe_mode') == OR strtolower(@ini_get('safe_mode')) == 'on') ? true false);

// try to force display_errors on
@ini_set('display_errors'true);

// define current directory
if (!defined('CWD'))
{
    
define('CWD', (($getcwd getcwd()) ? $getcwd '.'));
}

// #############################################################################
// fetch the core classes
require_once(CWD '/includes/class_core.php');

// initialize the data registry
$vbulletin =& new vB_Registry();

// parse the configuration ini file
$vbulletin->fetch_config();

if (
CWD == '.')
{
    
// getcwd() failed and so we need to be told the full forum path in config.php
    
if (!empty($vbulletin->config['Misc']['forumpath']))
    {
        
define('DIR'$vbulletin->config['Misc']['forumpath']);
    }
    else
    {
        
trigger_error('<strong>Configuration</strong>: You must insert a value for <strong>forumpath</strong> in config.php'E_USER_ERROR);
    }
}
else
{
    
define('DIR'CWD);
}

// load database class
switch (strtolower($vbulletin->config['Database']['dbtype']))
{
    
// load standard MySQL class
    
case 'mysql':
    case 
'mysql_slave':
    case 
'':
    {
        
$db =& new vB_Database($vbulletin);
        break;
    }

    
// load MySQLi class
    
case 'mysqli':
    case 
'mysqli_slave':
    {
        
$db =& new vB_Database_MySQLi($vbulletin);
        break;
    }

    
// load extended, non MySQL class
    
default:
    {
    
// this is not implemented fully yet
    //    $db = 'vB_Database_' . $vbulletin->config['Database']['dbtype'];
    //    $db =& new $db($vbulletin);
        
die('Fatal error: Database class not found');
    }
}

$db->appshortname 'vBulletin (' VB_AREA ')';

if (!
defined('SKIPDB'))
{
    
// we do not want to use the slave server at all during this process
    // as latency problems may occur
    
$vbulletin->config['SlaveServer']['servername'] = '';
    
// make database connection
    
$db->connect(
        
$vbulletin->config['Database']['dbname'],
        
$vbulletin->config['MasterServer']['servername'],
        
$vbulletin->config['MasterServer']['port'],
        
$vbulletin->config['MasterServer']['username'],
        
$vbulletin->config['MasterServer']['password'],
        
$vbulletin->config['MasterServer']['usepconnect'],
        
$vbulletin->config['SlaveServer']['servername'],
        
$vbulletin->config['SlaveServer']['port'],
        
$vbulletin->config['SlaveServer']['username'],
        
$vbulletin->config['SlaveServer']['password'],
        
$vbulletin->config['SlaveServer']['usepconnect'],
        
$vbulletin->config['Mysqli']['ini_file'],
        
$vbulletin->config['Mysqli']['charset']
    );
    if (!empty(
$vbulletin->config['Database']['force_sql_mode']))
    {
        
$db->force_sql_mode('');
    }

    
// make $db a member of $vbulletin
    
$vbulletin->db =& $db;

    
// #############################################################################
    // fetch options and other data from the datastore

    // grab the MySQL Version once and let every script use it.
    
$mysqlversion $db->query_first("SELECT version() AS version");
    
define('MYSQL_VERSION'$mysqlversion['version']);

    if (
VB_AREA == 'Upgrade')
    {
        
$optionstemp false;

        
$db->hide_errors();
            
$optionstemp $db->query_first("SELECT template FROM template WHERE title = 'options' AND templatesetid = -1");
        
$db->show_errors();

        
// ## Found vB2 Options so use them...
        
if ($optionstemp)
        {
            eval(
$optionstemp['template']);
            
$vbulletin->options =& $vboptions;
            
$vbulletin->versionnumber $templateversion;
        }
        else
        {
            
// we need our datastore table to be updated properly to function
            
$db->hide_errors();
            
$db->query_write("ALTER TABLE " TABLE_PREFIX "datastore ADD unserialize SMALLINT NOT NULL DEFAULT '2'");
            
$db->show_errors();

            
$datastore_class = (!empty($vbulletin->config['Datastore']['class'])) ? $vbulletin->config['Datastore']['class'] : 'vB_Datastore';

            if (
$datastore_class != 'vB_Datastore')
            {
                require_once(
DIR '/includes/class_datastore.php');
            }
            
$vbulletin->datastore =& new $datastore_class($vbulletin$db);
            
$vbulletin->datastore->fetch($specialtemplates);
        }
    }
    else if (
VB_AREA == 'Install')
    { 
// load it up but don't actually call fetch, we need the ability to overwrite fields.
        
$datastore_class = (!empty($vbulletin->config['Datastore']['class'])) ? $vbulletin->config['Datastore']['class'] : 'vB_Datastore';

        if (
$datastore_class != 'vB_Datastore')
        {
            require_once(
DIR '/includes/class_datastore.php');
        }
        
$vbulletin->datastore =& new $datastore_class($vbulletin$db);
    }

    
// ## Load latest bitfields, overwrite datastore versions (if they exist)
    // ## (so latest upgrade script can access any new permissions)
    
require_once(DIR '/includes/class_bitfield_builder.php');
    if (
vB_Bitfield_Builder::build_datastore() !== false)
    {
        
$myobj =& vB_Bitfield_Builder::init();
        require_once(
DIR '/includes/functions.php');
        require_once(
DIR '/includes/functions_misc.php');

        foreach (
array_keys($myobj->datastore) AS $group)
        {
            
$vbulletin->{'bf_' $group} =& $myobj->datastore["$group"];
            foreach (
array_keys($myobj->datastore["$group"]) AS $subgroup)
            {
                
$vbulletin->{'bf_' $group '_' $subgroup} =& $myobj->datastore["$group"]["$subgroup"];
            }
        }
    }
    else
    {
        
trigger_error('Error Building Bitfields'E_USER_ERROR);
    }
}

// setup an empty hook class in case we run some of the main vB code
require_once(DIR '/includes/class_hook.php');
$hookobj =& vBulletinHook::init();
$vbulletin->pluginlist '';

/*======================================================================*\
|| ####################################################################
|| #
|| # CVS: $RCSfile$ - $Revision: 17122 $
|| ####################################################################
\*======================================================================*/
?>
Đại khái là làm theo ebook đến bước đó thì em ko biết cách làm biết và sửa như thế nào T_T . Ebook chỉ thực hành tiếp khi chắc chắn đúng .

Cám ơn đã đọc . Huynh đài nào có kinh nghiệm và có lòng tốt xin add yahoo của em : [email protected] .
Cám ơn lần nữa .
Cài này bạn chỉnh vẫn thiếu ở trong file config thì lấy gì mà install đc sửa lại những file còn thiếu nữa là đc.
Đang còn 1 chỗ mà chỉnh user và pas nữa tìm đi bên dưới ấy sửa xong là có thể install bình thường

Tài sản của MrLuck™
Trả lời kèm theo trích dẫn
 
Page generated in 0,03580 seconds with 15 queries