|
楼主 |
发表于 2003-5-20 16:30:20
|
显示全部楼层
是我的粗心导致的,不好意思。不过现在又有新的问题了,装到60%的时候,说newinstall.php的36行有错误,我是全新安装,按照Bluedata的方法做得前面的步骤,怎么回事?这是我的newinstall.php文件:
<?php
// File: $Id: newinstall.php,v 1.1.1.1 2002/09/15 22:26:15 root Exp $ $Name: $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Gregor J. Rothfuss
// Purpose of file: Provide functions for a new install.
// ----------------------------------------------------------------------
/*** This function creates the DB on new installs ***/
function make_db($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype, $dbmake)
{
global $dbconn;
echo "<center><br><br>";
if ($dbmake) {
mysql_pconnect($dbhost, $dbuname, $dbpass);
$result = mysql_query("CREATE DATABASE $dbname") or die (_MAKE_DB_1);
$message = "<br><br><font class=\"pn-failed\">$dbname "._MAKE_DB_2."</font>";
echo $message;
} else {
echo "<font class=\"pn-failed\">"._MAKE_DB_3."</font>";
}
include("install/newtables.php");
}
/*** This function inserts the default data on new installs ***/
function input_data($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype, $aid, $name, $pwd, $repeatpwd, $email, $url)
{
if ($pwd != $repeatpwd) {
echo _PWBADMATCH;
exit;
} else {
echo "<font class=\"pn-title\">"._INPUT_DATA_1."</font>";
echo "<center>";
global $dbconn;
mysql_connect($dbhost, $dbuname, $dbpass);
mysql_select_db("$dbname") or die ("<br><font class=\"pn-sub\">"._NOTSELECT."</font>");
// Put basic information in first
include("install/newdata.php");
// new installs will use md5 hashing - compatible on windows and *nix variants.
$pwd = md5($pwd);
$result = $dbconn->Execute("INSERT INTO ".$prefix."_users VALUES ( NULL, '$name', '$aid', '$email', '', '$url', 'blank.gif', ".time().", '', '', '', '', '', '', '', '', '', '', '$pwd', 10, '', 0, 0, 0, '', 0, '', '', 4096, 0, '12.0')") or die ("<b>"._NOTUPDATED.$prefix."_users</b>");
echo "<br><font class=\"pn-sub\">".$prefix."_users"._UPDATED."</font>";
// We know that the above user is UID 2 and that the admin group is GID 2 from the install/newdata
$result = $dbconn->Execute("INSERT INTO ".$prefix."_group_membership VALUES (2, 2)") or die ("<b>"._NOTUPDATED.$prefix."_group_membership</b>");
echo "<br><font class=\"pn-sub\">".$prefix."_group_membership"._UPDATED."</font>";
}
}
?>我用的是RH8
Bluedata兄,能不能把你的newinstall.php文件发给我,我的信箱是[email protected]。谢谢了先。 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|