I get these on somthing else, BTW i have download there BB and they should
work
Warning: Undefined variable: realm in c:\inetpub\wwwroot\f\install-95.php on
line 4
Warning: Use of undefined constant dbhost - assumed 'dbhost' in
c:\inetpub\wwwroot\f\install-95.php on line 12
Warning: Undefined variable: dbhost in c:\inetpub\wwwroot\f\install-95.php
on line 12
Warning: Use of undefined constant dbuser - assumed 'dbuser' in
c:\inetpub\wwwroot\f\install-95.php on line 13
Warning: Undefined variable: dbuser in c:\inetpub\wwwroot\f\install-95.php
on line 13
Warning: Use of undefined constant dbpass - assumed 'dbpass' in
c:\inetpub\wwwroot\f\install-95.php on line 14
Warning: Undefined variable: dbpass in c:\inetpub\wwwroot\f\install-95.php
on line 14
Warning: Use of undefined constant dbname - assumed 'dbname' in
c:\inetpub\wwwroot\f\install-95.php on line 15
Warning: Undefined variable: dbname in c:\inetpub\wwwroot\f\install-95.php
on line 15
Warning: Undefined variable: submit in c:\inetpub\wwwroot\f\install-95.php
on line 34
----------------------------------------------------------------------------
--------------------------------------------
My install-05.php looks like this
----------------------------------------------------------------------------
--------------------------------------------
<?
$version = ".95";
if (!$realm)
$realm = "default";
/*
if (($realm)&&(file_exists("realm.$realm.php")))
include "realm.$realm.php";
else
include "realm.default.php";
*/
$config[dbhost]=$dbhost;
$config[dbuser]=$dbuser;
$config[dbpass]=$dbpass;
$config[dbname]=$dbname;
include 'funcs.mysql.php';
function check_table_existence($table){
global $config;
if (db_numrows_all($table) > 0){
return TRUE;
} else {
return FALSE;
}
}
if ($submit){
if (file_exists("realm.$realm.php")){
print "Error: Realm $realm already exists!";
} else {
$phpver = phpversion();
$ext[ldap] = extension_loaded("ldap");
$ext[mysql] = extension_loaded("mysql");
$installer[ip] = getenv("REMOTE_ADDR");
$installer[browser] = getenv("HTTP_USER_AGENT");
$server[os] = getenv("OSTYPE");
$server[web] = getenv("SERVER_SOFTWARE");
$server[host] = getenv("HTTP_HOST");
//$ext[mysql] = FALSE;
//$phpver = "3.0.17";
//print floor($phpver);
if ($ext[mysql]){
db_connect();
$res_version = mysql_query("SELECT Version() as
version");
$mysql = mysql_fetch_array($res_version);
}
print "<strong><font size='+2'>Installing electrifiedForum
$version</font></strong><br><br>";
print "<strong>System Information</strong><br>";
print "PHP Version: $phpver<br>";
if (floor($phpver)<4) print "<font color=red>PHP Version Not 4.0 or
Greater</font> You may have problems<br>";
print "MySQL Version: $mysql[version]<br>";
if (!strstr($mysql[version],"3.23")) print "<font color=red>MySQL
Version
Not 3.23.x</font> You may have problems<br>";
print "Server OS: $server[os]<br>";
print "Web Server Daemon: $server[web]<br>";
print "Server Hostname: $server[host]<br>";
print "<br>";
if ($ext[mysql])
print "MySQL Extension Loaded<Br>";
if ($ext[ldap])
print "LDAP Extension Loaded (Not yet used)<Br>";
print "<br><hr noshade width=20% align=left>";
print "Building MySQL Tables in database $config[dbname]...<br><br>";
if ($ext[mysql]){
print "Creating forums table...";
if (!check_table_existence("forums")){
if (mysql_query("CREATE TABLE forums (
fname varchar(20) NOT NULL,
ftitle varchar(30) NOT NULL,
fdesc varchar(200) NOT NULL,
cat varchar(40) NOT NULL,
owner varchar(100) NOT NULL,
icon varchar(100) NOT NULL,
options smallint(6) DEFAULT '1' NOT NULL,
PRIMARY KEY (fname),
UNIQUE fname (fname),
KEY fname_2 (fname)
);")){
print "Success<br>";
} else {
print "<font color=red>Error</font><br>";
$errors++;
}
mysql_query("INSERT INTO forums VALUES ('chat','Chat','A forum
to talk
about anything and everything!','General','$adminuser','','1');");
} else {
print "<font color=red>Warning!</font> Forums table
Already
Exists!<br>";
$warnings++;
}
print "Creating users table...";
if (!check_table_existence("fusers")){
if (mysql_query("CREATE TABLE fusers (
username varchar(20) NOT NULL,
password varchar(20) NOT NULL,
level smallint(6) DEFAULT '0'
NOT NULL,
options tinyint(4) DEFAULT '0'
NOT NULL,
location varchar(100) NOT NULL,
email varchar(100) NOT NULL,
homepage varchar(200) NOT NULL,
showemail tinyint(4) DEFAULT '0' NOT NULL,
icq varchar(20) NOT NULL,
showicq tinyint(4) DEFAULT '0' NOT NULL,
aim varchar(40) NOT NULL,
showaim tinyint(1) DEFAULT '0' NOT NULL,
yahoo varchar(80) NOT NULL,
showyahoo tinyint(1) DEFAULT '0' NOT NULL,
realname varchar(100) NOT NULL,
age smallint(6) DEFAULT '0' NOT NULL,
birthday varchar(8) NOT NULL,
showbirthday tinyint(4) DEFAULT '0' NOT NULL,
gender varchar(10) NOT NULL,
avatar varchar(60) NOT NULL,
sig text NOT NULL,
disabled tinyint(1) DEFAULT
'0' NOT NULL,
rank smallint(6) DEFAULT '0'
NOT NULL,
votes smallint(6) DEFAULT '0'
NOT NULL,
PRIMARY KEY (username),
UNIQUE username (username),
KEY username_2 (username)
);")){
print "Success<br>";
} else {
print "<font color=red>Error</font><br>";
$errors++;
}
mysql_query("INSERT INTO fusers VALUES (
'$adminuser', '$adminpass',
'10', '0', '', '', '', '0', '', '0', '', '0', '', '0', '', '', '', '0', '',
'', '', '0', '', '');");
} else {
print "<font color=red>Warning!</font> Users table
Already Exists!<br>";
$warnings++;
}
print "Creating messages table...";
if (!check_table_existence("messages")){
if (mysql_query("CREATE TABLE messages (
id smallint(6) NOT NULL auto_increment,
fname varchar(20) NOT NULL,
threadid smallint(6) DEFAULT '0' NOT NULL,
threadindex smallint(6) DEFAULT '0' NOT NULL,
poster varchar(100) NOT NULL,
title varchar(120) NOT NULL,
content text NOT NULL,
icon varchar(60) NOT NULL,
ip varchar(60) NOT NULL,
posttime timestamp(14),
options smallint(6) DEFAULT '1' NOT NULL,
PRIMARY KEY (id),
UNIQUE id (id),
KEY forumname (fname)
);")){
print "Success<br>";
} else {
print "<font color=red>Error</font><br>";
$errors++;
}
mysql_query("INSERT INTO messages VALUES
('1','chat','0','0','$adminuser','Welcome to electrifiedForum', 'If you see
this message, electrifiedForum is properly installed and configured!!', '',
'', now(), '1')");
} else {
print "<font color=red>Warning!</font> Messages table
Already
Exists!<br>";
$warnings++;
}
} else {
print "<strong><font color=red>FATAL ERROR</font></strong>:
Unable to
build MySQL tables: MySQL Support Not Enabled in this version of PHP<br>";
$errors++;
}
/* Now to open up the template file, parse the vars, and writeout the
realm file */
$tf = fopen('realmtemplate.txt','r');
$templa = fread($tf, filesize('realmtemplate.txt'));
$data = str_replace("[%REALM-TITLE%]",$title,$templa);
$data = str_replace("[%DB-HOST%]",$dbhost,$data);
$data = str_replace("[%DB-USER%]",$dbuser,$data);
$data = str_replace("[%DB-PASS%]",$dbpass,$data);
$data = str_replace("[%DB-NAME%]",$dbname,$data);
$data = str_replace("[%DESCRIPTION%]",$description,$data);
$data = str_replace("[%KEYWORDS%]",$keywords,$data);
fclose($tf);
$rf = fopen("realm.$realm.php",'w');
fwrite($rf,$data);
fclose($rf);
print "<br>";
if (!$errors && !$warnings)
print "Install successful, No errors or warnings<br>";
elseif (!$errors)
print "Install complete but with warnings<br>";
else
print "Errors occurred during Installation.<br>";
}
} else {
/* Installation Options Form */
?>
<form action='install-95.php?realm=<?=$realm?>' method=post>
Please fill out the form below in order to install electrifiedForum 0.95 for
realm: <?=$realm?><br>
<br>
Administrator User Name:<input type=text name=adminuser><br>
<br>
Administrator Password:<input type=text name=adminpass><br>
<br>
Title of forums:<input type="text" name=title><br>
<br>
MySQL Database Host:<input type="text" name=dbhost><br>
<br>
MySQL Database Username:<input type="text" name=dbuser><br>
<br>
MySQL Database Password:<input type="text" name=dbpass><br>
<br>
MySQL Database Name:<input type="text" name=dbname><br>
<br>
Description:<input type="text" name=description><br>
<br>
Keywords:<input type="text" name=keywords><br>
<input type=submit name=submit value='Install'>
</form>
<?
}
?>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]