Help, cái VBB!!!!

Thảo luận trong 'Lập Trình Web' bắt đầu bởi Jaguar™, 21/10/06.

  1. Jaguar™

    Jaguar™ Sorrowful Farewell

    Tham gia ngày:
    8/4/06
    Bài viết:
    3,605
    Nơi ở:
    Đà Nẵng
    Em đang mần 1 cái forum cho lớp. Làm host tại byethost.com. Đã sửa trong file config.php như người ta bày. Up cái thư mục đó lên. Chạy install.php nó ko hiện ra cái gì cả::( . Em đã thử qua chục cái host, cái thì giới hạn 500k (vbb có mấy cái gần 1MB), cái thì ko hỗ trợ SQL. Ai biết chỉ giùm mấy cái host (free)!!!!
     
  2. Jaguar™

    Jaguar™ Sorrowful Farewell

    Tham gia ngày:
    8/4/06
    Bài viết:
    3,605
    Nơi ở:
    Đà Nẵng
    Xong!!! Nhưng nó lại hiện:

    You can't continue until keygen.php has not replaced value
     
  3. Powers_2004

    Powers_2004 Hàng VN xuất khẩu \m/ Moderator

    Tham gia ngày:
    13/7/04
    Bài viết:
    1,171
    Nơi ở:
    Hanoi
    CMOD tất cả các File trong Forum thành 777 là ok
     
  4. Nguyen_Kain

    Nguyen_Kain Quậy hết mình Moderator

    Tham gia ngày:
    28/5/04
    Bài viết:
    1,299
    PW đọc kỹ bài này trước khi trả lời nhé :;)

    Hình như cái này là do bạn dùng bản VBB mà ko có key hẳn hơi , bạn có down đúng bản null về xài không vậy ? :-s
     
  5. Powers_2004

    Powers_2004 Hàng VN xuất khẩu \m/ Moderator

    Tham gia ngày:
    13/7/04
    Bài viết:
    1,171
    Nơi ở:
    Hanoi
    Ack
    lỗi này là do nó chưa CMOD 777 tất cả các File
    sau đó chạy file keygen.php để nó edit toàn bộ key trong các file nó mới cho install
     
  6. Tào_Tung

    Tào_Tung Mr & Ms Pac-Man

    Tham gia ngày:
    20/10/06
    Bài viết:
    183
    nếu xài bản null của mafia thì phải chỉnh lại chmod là 777 , sau đó mới tiêp tục được . còn nếu bản null của DGT thì không cần vì nó tự tạo keygen cho mình .
     
  7. Jaguar™

    Jaguar™ Sorrowful Farewell

    Tham gia ngày:
    8/4/06
    Bài viết:
    3,605
    Nơi ở:
    Đà Nẵng
    Bản này. Nhưng vẫn bị:((

    Giờ nó đai luôn rồi!!!!
    Ai vô cái host coi giùm có được ko????
    FPT: abc@windowlove.byethost2.com
    User: abc@windowlove.byethost2.com
    Pass: hoanganh

    Xem giùm file config có được ko??? Giúp em chút. Mất 5 6 ngày mà chưa xong:((
     
  8. hikaru_anh

    hikaru_anh Legend of Zelda

    Tham gia ngày:
    20/7/05
    Bài viết:
    1,017
    nếu ra dc thế thì config.php cuả bạn hoàn toàn đúng rồi nhưng trước khi chạy file install.php, cạhy file keygen.php để lấy số key rùi del nó đi, sau đó mới chạy install.php để paste vào
     
  9. yphanh2002

    yphanh2002 I ♥︎ You Hannah Moderator Lão Làng GVN

    Tham gia ngày:
    22/3/03
    Bài viết:
    6,346
    Nơi ở:
    USA
    Để mình giải thích chi tiếc luôn nha. Theo mình cái này bạn bị lý do là như sau: bản vbb DGT của bạn không phải là bản còn y nguyên, tức là nó đã bị ai đ1o chạy file kygen.php 1 lần trước rồi.
    Cách khác phục là như sau: Bạn download lại 1 bản vbb, sau đ1o up lên host, chômd tất cả file và folder thành 777 kể cả các file hình ảnh. Rồi chỉ chạy file keygen.php 1 lần duy nhất. Copy cái key đó lại. Sau đó chạy file install.php và páte kye đ1o vào khi nó hỏi customer numbers.Thanks
     
  10. Jaguar™

    Jaguar™ Sorrowful Farewell

    Tham gia ngày:
    8/4/06
    Bài viết:
    3,605
    Nơi ở:
    Đà Nẵng
    Grrrrrrrrrrrrrrrr!!! lần này mà ko xong thì... em cũng hát bài thôi nhé em!!!!

    Nhân tiện hỏi thêm, muốn chmod tất cả các file (dùng leaffpt) thì làm sao??? Có phải chỉ cần click phải chuột vào thư mục gốc rồi điền chmod à?????
     
  11. yphanh2002

    yphanh2002 I ♥︎ You Hannah Moderator Lão Làng GVN

    Tham gia ngày:
    22/3/03
    Bài viết:
    6,346
    Nơi ở:
    USA
    Chọn tất cả cá thư mục, click chuột phải rồi chọn chmod điền vào số 777
     
  12. Jaguar™

    Jaguar™ Sorrowful Farewell

    Tham gia ngày:
    8/4/06
    Bài viết:
    3,605
    Nơi ở:
    Đà Nẵng
  13. Jaguar™

    Jaguar™ Sorrowful Farewell

    Tham gia ngày:
    8/4/06
    Bài viết:
    3,605
    Nơi ở:
    Đà Nẵng
    Trong phần Forum Manager nó báo DATABASE lỗi và cái này:
     
  14. yphanh2002

    yphanh2002 I ♥︎ You Hannah Moderator Lão Làng GVN

    Tham gia ngày:
    22/3/03
    Bài viết:
    6,346
    Nơi ở:
    USA
    THứ nhất bãn đang sử dụng bãn vbb3.6.0 Release candidate 2 ( chỉ là 1 dạng bản beta nên vẫn còn 1 số lỗi của nhà sản xuất), Bạn nên sử dụng bản vbb3.6.0 gold để khắc phục lỗi này.
    Còn lỗi đó được hiểu như sau: trong database của bạn tại table 'field list', không tìm thấy cột mang tên infractiongroupid.
    Bạn nên coi lại lúc cài đặt đã empty databse chưa rồi hãy cài để hạn chế bớt các lỗi về database.
    Thanks
     
  15. Jaguar™

    Jaguar™ Sorrowful Farewell

    Tham gia ngày:
    8/4/06
    Bài viết:
    3,605
    Nơi ở:
    Đà Nẵng
    ??? Tui down bản 3.6.2 đàng hoàng mà!!!! Giờ mà làm lại chắc chết mất:((Mà tất cả đều làm được, vô admin cp, đăng kí trong diễn đàn ok hết,
     
  16. yphanh2002

    yphanh2002 I ♥︎ You Hannah Moderator Lão Làng GVN

    Tham gia ngày:
    22/3/03
    Bài viết:
    6,346
    Nơi ở:
    USA
    Làm được vậy thì khi nào bạn bị báo lỗi đó chẳng hạn khi tạo topic hay post 1 bài mới,....
    Nếu bạn thấy được, bạn gửi lên cho mình phiên bản vbb3.6.2 mà bạn đang sử dụng để mình thử cài và kiểm tra cho chắc ăn thanks
     
  17. Jaguar™

    Jaguar™ Sorrowful Farewell

    Tham gia ngày:
    8/4/06
    Bài viết:
    3,605
    Nơi ở:
    Đà Nẵng
    Thì cái phiên bản mình down bên vbb4vn đó. Thử tạo database khác cũng bị vậy. Mình host tại byethost.com. Hay cái host có vấn đề???
    Vô Admin CP thì được, còn vô Forum thì lỗi.
     
  18. hikaru_anh

    hikaru_anh Legend of Zelda

    Tham gia ngày:
    20/7/05
    Bài viết:
    1,017
    hót chả bị sao cả, vô empty cái database rùi install lại đi
     
  19. Julian Chen

    Julian Chen Youtube Master Race

    Tham gia ngày:
    23/8/06
    Bài viết:
    40
    mọi người giúp em

    http://ultimatevirus.byethost32.com/forum

    vào nó báo lỗi database error

    phuchoi.php
    Mã:
    <?php
    $db_host = "localhost";
    $db_user = "Julian";
    $db_pass = "onlyuangel";
    $db_name = "administrator";
    
    $link = @mysql_connect($db_host, $db_user, $db_pass);
    
    mysql_select_db($db_name, $link);
    $file="binhminh.sql";
    $ndfile = file($file);
    $type="NONE";
    $drop_a=array(); 
    $table_q=array(); 
    $data_q=array();
    $tables_q=0;
    echo "Xin cho doi trong giay lat...<br>";
    foreach($ndfile as $line) {
    $line=chop($line);
    if ($type=="NONE") {
    if(strtolower(substr($line,0,6))=="insert") {
    $data_q[]=substr($line,0,strlen($line)-1);
    } elseif(strtolower(substr($line,0,6))=="create") {
    $type="TABLE";
    $table_q[$tables_q]=$line."\n";
    } elseif(strtolower(substr($line,0,4))=="drop") {
    $type="NONE";
    array_push($drop_a, $line);
    }
    } elseif ($type=="TABLE") {
    if(strtolower(substr($line,0,1))==")") {
    $type="NONE";
    $table_q[$tables_q] .= substr($line,0,strlen($line)-1)."\n";
    $tables_q++;
    } else {
    $table_q[$tables_q] .= $line."\n";
    }
    }
    }
    $sql_error=0;
    foreach($drop_a as $q_data) {
    if($q_data != "") {
    $q=mysql_query($q_data);
    if($q == 0) $sql_error=1; 
    }
    }
    
    foreach($table_q as $q_data) {
    if($q_data != "") {
    $q=mysql_query($q_data);
    if($q == 0) $sql_error=1; 
    }
    }
    
    foreach($data_q as $q_data) {
    if($q_data != "") {
    $q=mysql_query($q_data);
    if($q == 0) $sql_error=1;
    }
    }
    if($sql_error==1) {
    echo "Da co loi !<br>Vui long kiem tra lai.";
    echo mysql_error();
    } else {
    echo "Chuc mung ban! Da cap nhat thanh cong.<br>\n";
    echo "Cap nhat <b>".sizeof($table_q)."</b> tables , va <b>".sizeof($data_q)."</b> fields.";
    }
    print("<br><br><br><center>.::<a href=\"http://anhduongbanmai.tk\">Dien Dan Trong Tuan</a> ::.</center> ");
    ?>  

    caidat.php
    Mã:
    <?php
    
    // File phuc hoi dung phuc hoi co so du lieu cua dien dan
    // Ban dien thong so ket noi database ben duoi sau do chay file nay de phuc hoi co so du lieu
    // Moi chi tiet xin lien he thong qua dien dan http://doisongso.net
    //Khi su dung ma nguon xin de Copyright Doisongso.NET
    // Database configuration
    
    $db_server   = "localhost ";
    $db_name     = "administrator";
    $db_username = "Julian";
    $db_password = "onlyuangel";
    
    
    // Other Settings
    
    $filename        = "vbulletin.sql";     // Specify the dump filename to suppress the file selection dialog
    $linespersession = 3000;   // Lines to be executed per one import session
    $delaypersession = 0;      // You can specify a sleep time in milliseconds after each session
                               // Works only if JavaScript is activated. Use to reduce server overrun
    
    // Allowed comment delimiters: lines starting with these strings will be dropped by BigDump
    
    $comment[0]="#";           // Standard comment lines are dropped by default
    $comment[1]="-- ";
    // $comment[2]="---";      // Uncomment this line if using proprietary dump created by outdated mysqldump
    // $comment[3]="";         // Or add your own string to leave out other proprietary things
    
    
    // *******************************************************************************************
    // If not familiar with PHP please don't change anything below this line
    // *******************************************************************************************
    
    define ("VERSION","0.21b");
    define ("MAX_LINE_LENGTH",65536);
    define ("MAX_QUERY_LINES",300);
    
    ini_set("auto_detect_line_endings", true);
    
    header("Expires: Mon, 1 Dec 2003 01:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Phuc hoi co so du lieu Ver<?php echo (VERSION); ?></title>
    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; CHARSET=iso-8859-1">
    <META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="EN">
    
    <META http-equiv="Cache-Control" content="no-cache">
    <META http-equiv="Pragma" content="no-cache">
    <META http-equiv="Expires" content="-1">
    
    <style type="text/css">
    <!--
    
    body
    { background-color:#FFFFF0;
    }
    
    h1 
    { font-size:25px;
      line-height:28px;
      font-family:Arial,Helvetica,sans-serif;
      margin-top:5px;
      margin-bottom:5px;
    }
    
    p,td,th
    { font-size:14px;
      line-height:18px;
      font-family:Arial,Helvetica,sans-serif;
      margin-top:5px;
      margin-bottom:5px;
      text-align:justify;
      vertical-align:top;
    }
    
    p.error
    { color:#FF0000;
      font-weight:bold;
    }
    
    p.success
    { color:#00DD00;
      font-weight:bold;
    }
    
    td
    { background-color:#F8F8F8;
      text-align:left;
    }
    
    td.transparent
    { background-color:#FFFFF0;
    }
    
    th
    { font-weight:bold;
      color:#FFFFFF;
      background-color:#008080;
      text-align:left;
    }
    
    td.right
    { text-align:right;
    }
    
    form
    { margin-top:5px;
      margin-bottom:5px;
    }
    
    -->
    </style>
    
    </head>
    
    <body>
    
    <table width="780" cellspacing="0" cellpadding="0">
    <tr><td class="transparent">
    
    <h1>Tao co so du lieu cho dien dan .</h1>
    
    <?php
    
    $error = false;
    $file  = false;
    
    // Check PHP version
    
    if (!$error && !function_exists("version_compare"))
    { echo ("<p class=\"error\">PHP version 4.1.0 is required for BigDump to proceed. You have PHP ".phpversion()." installed. Sorry!</p>\n");
      $error=true;
    }
    
    // Calculate PHP max upload size (handle settings like 10M or 100K)
    
    if (!$error)
    { $upload_max_filesize=ini_get("upload_max_filesize");
      if (eregi("([0-9]+)K",$upload_max_filesize,$tempregs)) $upload_max_filesize=$tempregs[1]*1024;
      if (eregi("([0-9]+)M",$upload_max_filesize,$tempregs)) $upload_max_filesize=$tempregs[1]*1024*1024;
      if (eregi("([0-9]+)G",$upload_max_filesize,$tempregs)) $upload_max_filesize=$tempregs[1]*1024*1024*1024;
    }
    
    // Handle file upload
    
    $upload_dir=dirname($_SERVER["SCRIPT_FILENAME"]);
    
    if (!$error && isset($_REQUEST["uploadbutton"]))
    { if (is_uploaded_file($_FILES["dumpfile"]["tmp_name"]) && ($_FILES["dumpfile"]["error"])==0)
      { 
        $uploaded_filename=str_replace(" ","_",$_FILES["dumpfile"]["name"]);
        $uploaded_filepath=str_replace("\\","/",$upload_dir."/".$uploaded_filename);
        	
        if (file_exists($uploaded_filename))
        { echo ("<p class=\"error\">File $uploaded_filename already exist! Delete and upload again!</p>\n");
        }
        else if (eregi("(\.php|\.php3|\.php4|\.php5)$",$uploaded_filename))
        { echo ("<p class=\"error\">You may not upload this type of files.</p>\n");
        }
        else if (!@move_uploaded_file($_FILES["dumpfile"]["tmp_name"],$uploaded_filepath))
        { echo ("<p class=\"error\">Error moving uploaded file ".$_FILES["dumpfile"]["tmp_name"]." to the $uploaded_filepath</p>\n");
          echo ("<p>Check the directory permissions for $upload_dir (must be 777)!</p>\n");
        }
        else
        { echo ("<p class=\"success\">Uploaded file saved as $uploaded_filename</p>\n");
        }
      }
      else
      { echo ("<p class=\"error\">Error uploading file ".$_FILES["dumpfile"]["name"]."</p>\n");
      }
    }
    
    
    // Handle file deletion (delete only in the current directory for security reasons)
    
    if (!$error && isset($_REQUEST["delete"]) && $_REQUEST["delete"]!=basename($_SERVER["SCRIPT_FILENAME"]))
    { if (@unlink(basename($_REQUEST["delete"])))
        echo ("<p class=\"success\">".$_REQUEST["delete"]." was removed successfully</p>\n");
      else
        echo ("<p class=\"error\">Can't remove ".$_REQUEST["delete"]."</p>\n");
    }
    
    
    // Open the database
    
    if (!$error)
    { $dbconnection = @mysql_connect($db_server,$db_username,$db_password); 
      if ($dbconnection) 
        $db = mysql_select_db($db_name);
      if (!$dbconnection || !$db) 
      { echo ("<p class=\"error\">Database connection failed due to ".mysql_error()."</p>\n");
        echo ("<p>Edit the database settings in ".$_SERVER["SCRIPT_FILENAME"]." or contact your database provider</p>\n");
        $error=true;
      }
    }
    
    
    // List uploaded files in multifile mode
    
    if (!$error && !isset($_REQUEST["fn"]) && $filename=="")
    { if ($dirhandle = opendir($upload_dir)) 
      { $dirhead=false;
        while (false !== ($dirfile = readdir($dirhandle)))
        { if ($dirfile != "." && $dirfile != ".." && $dirfile!=basename($_SERVER["SCRIPT_FILENAME"]))
          { if (!$dirhead)
            { echo ("<table cellspacing=\"2\" cellpadding=\"2\">\n");
              echo ("<tr><th>Filename</td><th>Size</td><th>Date&amp;Time</td><th>Type</td><th>&nbsp;</td><th>&nbsp;</td>\n");
              $dirhead=true;
            }
            echo ("<tr><td>$dirfile</td><td class=\"right\">".filesize($dirfile)."</td><td>".date ("Y-m-d H:i:s", filemtime($dirfile))."</td>");
            if (eregi("\.gz$",$dirfile)) 
              echo ("<td>GZip</td>");
            else 
              echo ("<td>SQL</td>");
            if (!eregi("\.gz$",$dirfile) || function_exists("gzopen")) 
              echo ("<td><a href=\"".$_SERVER["PHP_SELF"]."?start=1&fn=$dirfile&foffset=0&totalqueries=0\">Start Import</a> into $db_name at $db_server</td>\n");
            else
              echo ("<td>&nbsp;</td>\n");
            echo ("<td><a href=\"".$_SERVER["PHP_SELF"]."?delete=$dirfile\">Delete file</a></td></tr>\n");
          } 
    
        }
        if ($dirhead) echo ("</table>\n");
        else echo ("<p>No uploaded files found in the working directory</p>\n");
        closedir($dirhandle); 
      }
      else
      { echo ("<p class=\"error\">Error listing directory $upload_dir</p>\n");
        $error=true;
      }
    }
    
    
    // Single file mode
    
    if (!$error && !isset ($_REQUEST["fn"]) && $filename!="")
    { echo ("<p><a href=\"".$_SERVER["PHP_SELF"]."?start=1&fn=$filename&foffset=0&totalqueries=0\">Start Import</a> from $filename into $db_name at $db_server</p>\n");
    }
    
    
    // File Upload Form
    
    if (!$error && !isset($_REQUEST["fn"]) && $filename=="")
    { 
    
    // Test permissions on working directory
    
      do { $tempfilename=time().".tmp"; } while (file_exists($tempfilename));
      if (!($tempfile=@fopen($tempfilename,"w")))
      { echo ("<p>Upload form disabled. Permissions for the working directory <i>$upload_dir</i> <b>must be set to 777</b> in order ");
        echo ("to upload files from here. Alternatively you can upload your dump files via FTP.</p>\n");
      }
      else
      { fclose($tempfile);
        unlink ($tempfilename);
     
        echo ("<p>You can now upload your dump file up to $upload_max_filesize bytes (".round ($upload_max_filesize/1024/1024)." Mbytes)  ");
        echo ("directly from your browser to the server. Alternatively you can upload your dump files of any size via FTP.</p>\n");
    ?>
    <form method="POST" action="<?php echo ($_SERVER["PHP_SELF"]); ?>" enctype="multipart/form-data">
    <input type="hidden" name="MAX_FILE_SIZE" value="$upload_max_filesize">
    <p>Dump file: <input type="file" name="dumpfile" accept="*/*" size=60"></p>
    <p><input type="submit" name="uploadbutton" value="Upload"></p>
    </form>
    <?php
      }
    }
    
    
    // Open the file
    
    if (!$error && isset($_REQUEST["fn"]))
    { 
    
    // Recognize GZip filename
    
      if (eregi("\.gz$",$_REQUEST["fn"])) 
        $gzipmode=true;
      else
        $gzipmode=false;
    
      if ((!$gzipmode && !$file=fopen($_REQUEST["fn"],"rt")) || ($gzipmode && !$file=gzopen($_REQUEST["fn"],"rt")))
      { echo ("<p class=\"error\">Can't open ".$_REQUEST["fn"]." for import</p>\n");
        echo ("<p>You have to upload the ".$_REQUEST["fn"]." to the server</p>\n");
        $error=true;
      }
    
    // Get the file size (can't do it fast on gzipped files, no idea how)
    
      else if ((!$gzipmode && fseek($file, 0, SEEK_END)==0) || ($gzipmode && gzseek($file, 0, SEEK_SET)==0))
      { if (!$gzipmode) $filesize = ftell($file);
        else $filesize = gztell($file); // Always zero, ignore
      }
      else
      { echo ("<p class=\"error\">I can't get the filesize of ".$_REQUEST["fn"]."</p>\n");
        $error=true;
      }
    }
    
    
    // ****************************************************
    // START IMPORT SESSION HERE
    // ****************************************************
    
    if (!$error && isset($_REQUEST["start"]) && isset($_REQUEST["foffset"]))
    {
      echo ("<p>Processing file: ".$_REQUEST["fn"]."</p>\n");
      echo ("<p>Starting at the line: ".$_REQUEST["start"]."</p>\n");
    
    // Check $_REQUEST["foffset"] upon $filesize (can't do it on gzipped files)
    
      if (!$gzipmode && $_REQUEST["foffset"]>$filesize)
      { echo ("<p class=\"error\">UNEXPECTED: Can't set file pointer behind the end of file</p>\n");
        $error=true;
      }
    
    // Set file pointer to $_REQUEST["foffset"]
    
      if (!$error && ((!$gzipmode && fseek($file, $_REQUEST["foffset"])!=0) || ($gzipmode && gzseek($file, $_REQUEST["foffset"])!=0)))
      { echo ("<p class=\"error\">UNEXPECTED: Can't set file pointer to offset: ".$_REQUEST["foffset"]."</p>\n");
        $error=true;
      }
    
    // Start processing queries from $file
    
      if (!$error)
      { $query="";
        $queries=0;
        $totalqueries=$_REQUEST["totalqueries"];
        $linenumber=$_REQUEST["start"];
        $querylines=0;
        $inparents=false;
    
        while (($linenumber<$_REQUEST["start"]+$linespersession || $query!="") 
           && ((!$gzipmode && $dumpline=fgets($file, MAX_LINE_LENGTH)) || ($gzipmode && $dumpline=gzgets($file, MAX_LINE_LENGTH))))
        { 
          
    // Handle DOS and Mac encoded linebreaks (I don't know if it will work on Win32 or Mac Servers)
    
          $dumpline=ereg_replace("\r\n$", "\n", $dumpline);
          $dumpline=ereg_replace("\r$", "\n", $dumpline);
          
    // DIAGNOSTIC
    // echo ("<p>Line $linenumber: $dumpline</p>\n");
    
    // Skip comments and blank lines only if NOT in parents
    
          if (!$inparents)
          { $skipline=false;
            reset($comment);
            foreach ($comment as $comment_value)
            { if (!$inparents && (trim($dumpline)=="" || strpos ($dumpline, $comment_value) === 0))
              { $skipline=true;
                break;
              }
            }
            if ($skipline)
            { $linenumber++;
              continue;
            }
          }
    
    // Remove double back-slashes from the dumpline prior to count the quotes ('\\' can only be within strings)
          
          $dumpline_deslashed = str_replace ("\\\\","",$dumpline);
    
    // Count ' and \' in the dumpline to avoid query break within a text field ending by ;
    // Please don't use double quotes ('"')to surround strings, it wont work
    
          $parents=substr_count ($dumpline_deslashed, "'")-substr_count ($dumpline_deslashed, "\\'");
          if ($parents % 2 != 0)
            $inparents=!$inparents;
    
    // Add the line to query
    
          $query .= $dumpline;
    
    // Don't count the line if in parents (text fields may include unlimited linebreaks)
          
          if (!$inparents)
            $querylines++;
          
    // Stop if query contains more lines as defined by MAX_QUERY_LINES
    
          if ($querylines>MAX_QUERY_LINES)
          {
            echo ("<p class=\"error\">Stopped at the line $linenumber. </p>");
            echo ("<p>At this place the current query includes more than ".MAX_QUERY_LINES." dump lines. That can happen if your dump file was ");
            echo ("created by some tool which doesn't place a semicolon followed by a linebreak at the end of each query, or if your dump contains ");
            echo ("extended inserts. Please read the BigDump FAQs for more infos.</p>\n");
            $error=true;
            break;
          }
    
    // Execute query if end of query detected (; as last character) AND NOT in parents
    
          if (ereg(";$",trim($dumpline)) && !$inparents)
          { if (!mysql_query(trim($query), $dbconnection))
            { echo ("<p class=\"error\">Error at the line $linenumber: ". trim($dumpline)."</p>\n");
              echo ("<p>Query: ".trim($query)."</p>\n");
              echo ("<p>MySQL: ".mysql_error()."</p>\n");
              $error=true;
              break;
            }
            $totalqueries++;
            $queries++;
            $query="";
            $querylines=0;
          }
          $linenumber++;
        }
      }
    
    // Get the current file position
    
      if (!$error)
      { if (!$gzipmode) 
          $foffset = ftell($file);
        else
          $foffset = gztell($file);
        if (!$foffset)
        { echo ("<p class=\"error\">UNEXPECTED: Can't read the file pointer offset</p>\n");
          $error=true;
        }
      }
    
    // Finish message and restart the script
    
      if (!$error)
      { echo ("<p>Stopping at the line: ".($linenumber-1)."</p>\n");
        echo ("<p>Queries performed (this session/total): $queries/$totalqueries</p>\n");
        echo ("<p>Total bytes processed: $foffset (".round($foffset/1024)." KB)</p>\n");
        if ($linenumber<$_REQUEST["start"]+$linespersession)
        { echo ("<p class=\"success\">Congratulations: End of file reached, assuming OK</p>\n");
          echo ("<p>Thank you for using! Please rate <a href=\"http://www.hotscripts.com/Detailed/20922.html\" target=\"_blank\">Bigdump at Hotscripts.com</a></p>\n");
          echo ("<p>You can send me some bucks or euros as appreciation <a href=\"http://www.ozerov.de/bigdump\" target=\"_blank\">via PayPal</a></p>\n");
          $error=true;
        }
        else
        { if ($delaypersession!=0)
            echo ("<p>Now I'm <b>waiting $delaypersession milliseconds</b> before starting next session...</p>\n");
          echo ("<script language=\"JavaScript\" type=\"text/javascript\">window.setTimeout('location.href=\"".$_SERVER["PHP_SELF"]."?start=$linenumber&fn=".$_REQUEST["fn"]."&foffset=$foffset&totalqueries=$totalqueries\";',500+$delaypersession);</script>\n");
          echo ("<noscript>\n");
          echo ("<p><a href=\"".$_SERVER["PHP_SELF"]."?start=$linenumber&fn=".$_REQUEST["fn"]."&foffset=$foffset&totalqueries=$totalqueries\">Continue from the line $linenumber</a> (Enable JavaScript to do it automatically)</p>\n");
          echo ("</noscript>\n");
          echo ("<p>Press <a href=\"".$_SERVER["PHP_SELF"]."\">STOP</a> to abort the import <b>OR WAIT!</b></p>\n");
        }
      }
      else 
        echo ("<p class=\"error\">Stopped on error</p>\n");
    }
    
    if ($error)
      echo ("<p><a href=\"".$_SERVER["PHP_SELF"]."\">Start from the beginning</a> (DROP the old tables before restarting)</p>\n");
    
    if ($dbconnection) mysql_close();
    if ($file && !$gzipmode) fclose($file);
    else if ($file && $gzipmode) gzclose($file);
    
    ?>
    
    <p>© 2003-2005 <a href="mailto:alexey@ozerov.de">Alexey Ozerov</a> - <a href="http://www.ozerov.de/bigdump" target="_blank">BigDump Home</a></p>
    
    </td></tr></table>
    
    </body>
    </html>
    config.php
    Mã:
    <?php
    /*======================================================================*\
    || #################################################################### ||
    || # vBulletin 3.6.1 - Licence Number VBFX6FOHYF
    || # ---------------------------------------------------------------- # ||
    || # All PHP code in this file is ©2000-2006 Jelsoft Enterprises Ltd. # ||
    || # 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 # ||
    || #################################################################### ||
    \*======================================================================*/
    
    /*-------------------------------------------------------*\
    | ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
    +---------------------------------------------------------+
    | If you get any errors while attempting to connect to    |
    | MySQL, you will need to email your webhost because we   |
    | cannot tell you the correct values for the variables    |
    | in this file.                                           |
    \*-------------------------------------------------------*/
    
    	//	****** DATABASE TYPE ******
    	//	This is the type of the database server on which your vBulletin database will be located.
    	//	Valid options are mysql and mysqli, for slave support add _slave.  Try to use mysqli if you are using PHP 5 and MySQL 4.1+
    $config['Database']['dbtype'] = 'mysql';
    
    	//	****** DATABASE NAME ******
    	//	This is the name of the database where your vBulletin will be located.
    	//	This must be created by your webhost.
    $config['Database']['dbname'] = 'administrator';
    
    	//	****** TABLE PREFIX ******
    	//	Prefix that your vBulletin tables have in the database.
    $config['Database']['tableprefix'] = '';
    
    	//	****** TECHNICAL EMAIL ADDRESS ******
    	//	If any database errors occur, they will be emailed to the address specified here.
    	//	Leave this blank to not send any emails when there is a database error.
    $config['Database']['technicalemail'] = 'dbmaster@example.com';
    
    	//	****** FORCE EMPTY SQL MODE ******
    	// New versions of MySQL (4.1+) have introduced some behaviors that are
    	// incompatible with vBulletin. Setting this value to "true" disables those
    	// behaviors. You only need to modify this value if vBulletin recommends it.
    $config['Database']['force_sql_mode'] = false;
    
    
    
    	//	****** MASTER DATABASE SERVER NAME AND PORT ******
    	//	This is the hostname or IP address and port of the database server.
    	//	If you are unsure of what to put here, leave the default values.
    $config['MasterServer']['servername'] = 'localhost';
    $config['MasterServer']['port'] = 3306;
    
    	//	****** MASTER DATABASE USERNAME & PASSWORD ******
    	//	This is the username and password you use to access MySQL.
    	//	These must be obtained through your webhost.
    $config['MasterServer']['username'] = 'Julian';
    $config['MasterServer']['password'] = 'onlyuangel';
    
    	//	****** MASTER DATABASE PERSISTENT CONNECTIONS ******
    	//	This option allows you to turn persistent connections to MySQL on or off.
    	//	The difference in performance is negligible for all but the largest boards.
    	//	If you are unsure what this should be, leave it off. (0 = off; 1 = on)
    $config['MasterServer']['usepconnect'] = 0;
    
    
    
    	//	****** SLAVE DATABASE CONFIGURATION ******
    	//	If you have multiple database backends, this is the information for your slave
    	//	server. If you are not 100% sure you need to fill in this information,
    	//	do not change any of the values here.
    $config['SlaveServer']['servername'] = 'localhost';
    $config['SlaveServer']['port'] = 3306;
    $config['SlaveServer']['username'] = 'administrator';
    $config['SlaveServer']['password'] = 'onlyuangel';
    $config['SlaveServer']['usepconnect'] = 0;
    
    
    
    	//	****** PATH TO ADMIN & MODERATOR CONTROL PANELS ******
    	//	This setting allows you to change the name of the folders that the admin and
    	//	moderator control panels reside in. You may wish to do this for security purposes.
    	//	Please note that if you change the name of the directory here, you will still need
    	//	to manually change the name of the directory on the server.
    $config['Misc']['admincpdir'] = 'admincp';
    $config['Misc']['modcpdir'] = 'modcp';
    
    	//	Prefix that all vBulletin cookies will have
    	//	Keep this short and only use numbers and letters, i.e. 1-9 and a-Z
    $config['Misc']['cookieprefix'] = 'bb';
    
    	//	******** FULL PATH TO FORUMS DIRECTORY ******
    	//	On a few systems it may be necessary to input the full path to your forums directory
    	//	for vBulletin to function normally. You can ignore this setting unless vBulletin
    	//	tells you to fill this in. Do not include a trailing slash!
    	//	Example Unix:
    	//	  $config['Misc']['forumpath'] = '/home/users/public_html/forums';
    	//	Example Win32:
    	//	  $config['Misc']['forumpath'] = 'c:\program files\apache group\apache\htdocs\vb3';
    $config['Misc']['forumpath'] = '';
    
    
    
    	//	****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ******
    	//	The users specified here will be allowed to view the admin log in the control panel.
    	//	Users must be specified by *ID number* here. To obtain a user's ID number,
    	//	view their profile via the control panel. If this is a new installation, leave
    	//	the first user created will have a user ID of 1. Seperate each userid with a comma.
    $config['SpecialUsers']['canviewadminlog'] = '1';
    
    	//	****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ******
    	//	The users specified here will be allowed to remove ("prune") entries from the admin
    	//	log. See the above entry for more information on the format.
    $config['SpecialUsers']['canpruneadminlog'] = '1';
    
    	//	****** USERS WITH QUERY RUNNING PERMISSIONS ******
    	//	The users specified here will be allowed to run queries from the control panel.
    	//	See the above entries for more information on the format.
    	//	Please note that the ability to run queries is quite powerful. You may wish
    	//	to remove all user IDs from this list for security reasons.
    $config['SpecialUsers']['canrunqueries'] = '';
    
    	//	****** UNDELETABLE / UNALTERABLE USERS ******
    	//	The users specified here will not be deletable or alterable from the control panel by any users.
    	//	To specify more than one user, separate userids with commas.
    $config['SpecialUsers']['undeletableusers'] = '';
    
    	//	****** SUPER ADMINISTRATORS ******
    	//	The users specified below will have permission to access the administrator permissions
    	//	page, which controls the permissions of other administrators
    $config['SpecialUsers']['superadministrators'] = '1';
    
    	// ****** DATASTORE CACHE CONFIGURATION *****
    	// Here you can configure different methods for caching datastore items.
    	// vB_Datastore_Filecache  - for using a cache file
    // $config['Datastore']['class'] = 'vB_Datastore_Filecache';
    	// vB_Datastore_Memcached - for using a Memcache server
    	// It is also necessary to specify the hostname or IP address and the port the server is listening on
    // $config['Datastore']['class'] = 'vB_Datastore_Memcached';
    // $config['Misc']['memcacheserver'] = '127.0.0.1';
    // $config['Misc']['memcacheport'] = '11211';
    
    // ****** The following options are only needed in special cases ******
    
    	//	****** MySQLI OPTIONS *****
    	// When using MySQL 4.1+, MySQLi should be used to connect to the database.
    	// If you need to set the default connection charset because your database
    	// is using a charset other than latin1, you can set the charset here.
    	// If you don't set the charset to be the same as your database, you
    	// may receive collation errors.  Ignore this setting unless you
    	// are sure you need to use it.
    // $config['Mysqli']['charset'] = 'utf8';
    
    	//	Optionally, PHP can be instructed to set connection parameters by reading from the
    	//	file named in 'ini_file'. Please use a full path to the file.
    	//	Example:
    	//	$config['Mysqli']['ini_file'] = 'c:\program files\MySQL\MySQL Server 4.1\my.ini';
    $config['Mysqli']['ini_file'] = '';
    
    // Image Processing Options
    	// Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings.
    $config['Misc']['maxwidth'] = 2592;
    $config['Misc']['maxheight'] = 1944;
    /*======================================================================*\
    || ####################################################################
    || # Downloaded: 02:22, Tue Sep 19th 2006
    || # CVS: $RCSfile: config.php.new,v $ - $Revision: 1.36 $
    || ####################################################################
    \*======================================================================*/
    ?>

    ai giúp dùm :-s
     
  20. korangar

    korangar Mega Man

    Tham gia ngày:
    11/6/03
    Bài viết:
    3,122
    Mã:
    //	****** SLAVE DATABASE CONFIGURATION ******
    	//	If you have multiple database backends, this is the information for your slave
    	//	server. If you are not 100% sure you need to fill in this information,
    	//	do not change any of the values here.
    $config['SlaveServer']['servername'] = 'localhost';
    $config['SlaveServer']['port'] = 3306;
    $config['SlaveServer']['username'] = 'administrator';
    $config['SlaveServer']['password'] = 'onlyuangel';
    $config['SlaveServer']['usepconnect'] = 0;
    
    cái này giữ nguyên , không thay đổi trong config .
     

Chia sẻ trang này