MySQL Error

Hallo,
Ich verstehe diese Fehlermeldung nicht:

steht doch da, syntax error? wie sieht denn der code aus?

Also die Ausführdatei so:

[code]<?php

Name of this file: setup.php

Does the initial installation of milliscripts redirection 1.4

include(„include/vars.php“);
require(„include/functions.php“);

// first check what do do
$do = $_GET[„do“];

// If no „do“ is specified, go to the main page
if (!$do) {
$do = „one“;
}

#################################

The fourth and last setup page

#################################
if ($do == ‚four‘) {
// Get all the variables
$con_adminusername = $_POST[„con_adminusername“];
$con_adminpass1 = $_POST[„con_adminpass1“];
$con_adminpass2 = $_POST[„con_adminpass2“];
$con_startpage = $_POST[„con_startpage“];
$con_pagetitle = $_POST[„con_pagetitle“];
$con_adminmail = $_POST[„con_adminmail“];
$con_domainip = $_POST[„con_domainip“];
$con_maindomain = $_POST[„con_maindomain“];
$con_language = $_POST[„con_language“];
$con_multiple = $_POST[„con_multiple“];
$con_minlength = $_POST[„con_minlength“];
$con_maxlength = $_POST[„con_maxlength“];
$con_autoappr = $_POST[„con_autoappr“];
$con_mailtoadmin = $_POST[„con_mailtoadmin“];
$con_theme = $_POST[„con_theme“];
$con_reserved = $_POST[„con_reserved“];
$con_forbidden = $_POST[„con_forbidden“];

// And proof them - much work!
if (empty($con_adminusername)) {
$error1 = „<font size=„1“ color=„red“>Username is missing“;
}
if (!$con_adminpass1) {
$error2 = „<font size=„1“ color=„red“>Password is missing“;
}
if (!$con_adminpass2) {
$error2a = „<font size=„1“ color=„red“>Password is missing“;
}
if(ereg("[^a-zA-Z0-9]",$con_adminpass1)) {
$error2 = „<font size=„1“ color=„red“>Invalid caracters“;
}
if(ereg("[^a-zA-Z0-9]",$con_adminpass2)) {
$error2a = „<font size=„1“ color=„red“>Invalid caracters“;
}
if ($con_adminpass1 != $con_adminpass2) {
$error2a = „<font size=„1“ color=„red“>Passwords must be equal“;
}
if (empty($con_startpage)) {
$error3 = „<font size=„1“ color=„red“>Real startpage is missing“;
}
if (empty($con_pagetitle)) {
$error4 = „<font size=„1“ color=„red“>Title is missing“;
}
if(!$con_adminmail || !verify_email($con_adminmail)) {
$error5 = „<font size=„1“ color=„red“>Invalid emailaddress“;
}
if (empty($con_maindomain)) {
$error6 = „<font size=„1“ color=„red“>Main domain name is missing“;
}
if (!is_numeric($con_minlength) || !is_numeric($con_maxlength) || empty($con_minlength) || empty($con_maxlength) || ($con_maxlength-$con_minlength) < 1) {
$error7 = „<font size=„1“ color=„red“>Invalid values“;
}
if (empty($con_reserved)) {
$error8 = „<font size=„1“ color=„red“>This value must not be empty“;
}
if (empty($con_forbidden)) {
$error9 = „<font size=„1“ color=„red“>This value must not be empty“;
}
if ($error1 || $error2 || $error2a || $error3 || $error4 || $error5 || $error6 || $error7 || $error8 || $error9) {
$do = „three“;
}
// If no error occured, lets write the data into the database
else {
$con_adminpass1 = md5($con_adminpass1);
mysql_connect("$mysql_host","$mysql_username","$mysql_passwd") or die (mysql_error());
mysql_select_db("$mysql_dbase") or die (mysql_error());
mysql_query(„INSERT INTO $options_table (home, sitetitle, adminemail, username, password, domainip, maindomain, mailtoadmin, language, multiple, minlength, maxlength, reserved, forbidden, autoappr, theme, release) VALUES (’$con_startpage’, ‚$con_pagetitle‘, ‚$con_adminmail‘, ‚$con_adminusername‘, ‚$con_adminpass1‘, ‚$con_domainip‘, ‚$con_maindomain‘, ‚$con_mailtoadmin‘, ‚$con_language‘, ‚$con_multiple‘, ‚$con_minlength‘, ‚$con_maxlength‘, ‚$con_reserved‘, ‚$con_forbidden‘, ‚$con_autoappr‘, ‚$con_theme‘, ‚1.4‘)“) or die (mysql_error());

// Show a success page
?>

milliscripts Redirection 1.4 Setup A:link { COLOR: #18578e;TEXT-DECORATION: none } A:visited { COLOR: #777777; TEXT-DECORATION: none } A:active { COLOR: #000000 } A:hover { COLOR: #000000;TEXT-DECORATION: underline overline } BODY { BACKGROUND-COLOR: #eeeeee } input,textarea,select,option{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#2B1F6A;BORDER:1px solid black } select{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#2B1F6A;BORDER:1px solid black } form{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#000000 } TD { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif }

 

 

milliscripts Redirection 1.4 setup - step 4

 

Setup finished!

Setup has been finished successfully.
Things you should do now:

  • Delete "setup.php" (this file) and "upgrade.php"
  • Log into the admin area (admin.php)
  • Add domains to your service (otherwise your users can't register)
  • Add categories (same as above)

Afterwards your service is ready to run!

<?php } }

###########################

The third setup page

###########################
if ($do == ‚three‘) {
// Get the available languages
$handle = opendir(„language“);
while ($file = readdir($handle)) {
if (!(($file==".") || ($file=="…"))) {
$lang_listbox .= „<option value=“$file"";
if ($file == $language) {
$lang_listbox .= " selected";
}
$file1 = str_replace(".php", „“, $file);
$lang_listbox .= „>$file1“;
}
}
closedir($handle);

// Get the available themes
$handle = opendir(„html“);
while ($file = readdir($handle)) {
if (!(($file==".") || ($file=="…"))) {
$theme_listbox .= „<option value=“$file"";
if ($file == $theme) {
$theme_listbox .= " selected";
}
$theme_listbox .= „>$file“;
}
}
closedir($handle);
?>

milliscripts Redirection 1.4 Setup A:link { COLOR: #18578e;TEXT-DECORATION: none } A:visited { COLOR: #777777; TEXT-DECORATION: none } A:active { COLOR: #000000 } A:hover { COLOR: #000000;TEXT-DECORATION: underline overline } BODY { BACKGROUND-COLOR: #eeeeee } input,textarea,select,option{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#2B1F6A;BORDER:1px solid black } select{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#2B1F6A;BORDER:1px solid black } form{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#000000 } TD { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif }

 

 

milliscripts Redirection 1.4 setup - step 3

 

The scripts need to know a few values...
Click on "continue" when you are finished.

Administrator Username: <?php echo $error1; ?>
  Important: the administrator username cannot be changed later on!  
     
Administrator Password: <?php echo $error2; ?>
Password again: <?php echo $error2a; ?>
     
Your "real" startpage: <?php echo $error3; ?>
  This is the page where visitors will be redirected, if no user subdomain is found. Please specify only the file relative to your webroot directory, for example: home.html or directory/home.html  
     
Your websites title: <?php echo $error4; ?>
     
Emailaddress: <?php echo $error5; ?>
  This is the address that is shown as "sender address" within system emails and mass emails  
     
Domain ip:  
  The ip address of your webserver - not necessary, but maybe needed for future functions  
     
Main domain: <?php echo $error6; ?>
  This is the domain name where your site runs on. No "http://www", just domain.com  
     
Language: <?php echo $lang_listbox; ?>  
  In which language shall your redirection site run? All available languages are listed  
     
Allow multiple: on off  
  Do you allow multiple registraions with the same email address? Set to "on" means "yes"  
     
Subdomainlength: minimum , maximum characters <?php echo $error7; ?>
     
Autoapprove: on off  
  Do you want new members to be automatically approved? Set to "on" means "yes", set to "off" means, that you manually have to approve new members  
     
Mail to Admin: on off  
  Do you want to receive an email everytime a new member registers? You could turn it to "on" in case you chose to manually approve every new member  
     
Website Theme: <?php echo $theme_listbox; ?>  
  All milliscripts Redirection pages appear in the theme you choose here  
     
Reserved Words: <?php echo $error8; ?>
  These are certain words which can't be registered as a subdomain. Fill in any words you want separated by "--", for example: admin--www--nic  
     
Forbidden Words: <?php echo $error9; ?>
  These are words which the users homepage must not contain. Fill in any words you want separated by "--", for example: hackz--warez  
     

 

 

 

<?php }

###########################

The second setup page

###########################
if ($do == ‚two‘) {
mysql_connect("$mysql_host","$mysql_username","$mysql_passwd") or die (mysql_error());
mysql_select_db("$mysql_dbase") or die (mysql_error());

// Create the tables
mysql_query(„CREATE TABLE $redir_table ( host varchar(100) NOT NULL default ‚‘, name varchar(25) NOT NULL default ‚‘, vname varchar(25) NOT NULL default ‚‘, passwd varchar(50) NOT NULL default ‚‘, email varchar(100) NOT NULL default ‚‘, url varchar(100) NOT NULL default ‚‘, title varchar(100) NOT NULL default ‚‘, descr text NOT NULL, keyw text NOT NULL, counter int(11) default NULL, robots varchar(50) NOT NULL default ‚‘, news char(3) NOT NULL default ‚‘, revisit text NOT NULL, time varchar(15) NOT NULL default ‚‘, ip varchar(20) NOT NULL default ‚‘, cat varchar(50) NOT NULL default ‚‘, lasttime varchar(15) NOT NULL default ‚‘, stats char(3) NOT NULL default ‚‘, mail char(3) NOT NULL default ‚‘, adtype varchar(15) NOT NULL default ‚‘, acticode varchar(15) NOT NULL default ‚‘, active char(3) NOT NULL default ‚‘, PRIMARY KEY (host), UNIQUE KEY host (host) )“) or die (mysql_error());
mysql_query(„CREATE TABLE $options_table ( home varchar(50) NOT NULL default ‚‘, sitetitle varchar(150) NOT NULL default ‚‘, adminemail varchar(50) NOT NULL default ‚‘, username varchar(50) NOT NULL default ‚‘, password varchar(50) NOT NULL default ‚‘, domainip varchar(15) NOT NULL default ‚‘, maindomain varchar(50) NOT NULL default ‚‘, mailtoadmin char(3) NOT NULL default ‚‘, language varchar(20) NOT NULL default ‚‘, multiple char(3) NOT NULL default ‚‘, minlength char(2) NOT NULL default ‚‘, maxlength char(2) NOT NULL default ‚‘, reserved text NOT NULL, forbidden text NOT NULL, autoappr char(3) NOT NULL default ‚‘, theme varchar(50) NOT NULL default ‚‘, release varchar(10) NOT NULL default ‚‘ )“) or die (mysql_error());
mysql_query(„CREATE TABLE $domain_table ( domain varchar(50) NOT NULL default ‚‘ )“) or die (mysql_error());
mysql_query(„CREATE TABLE $category_table ( category varchar(50) NOT NULL default ‚‘, advtype varchar(20) NOT NULL default ‚‘, adurl varchar(150) NOT NULL default ‚‘, height varchar(4) NOT NULL default ‚‘, width varchar(4) NOT NULL default ‚‘ )“) or die (mysql_error());
mysql_query(„CREATE TABLE $visitor_table ( host varchar(100) NOT NULL default ‚‘, date varchar(15) NOT NULL default ‚‘, ip varchar(20) NOT NULL default ‚‘, agent varchar(250) NOT NULL default ‚‘, ref varchar(250) NOT NULL default ‚‘, timestamp varchar(15) NOT NULL default ‚‘ )“) or die (mysql_error());

?>

milliscripts Redirection 1.4 Setup A:link { COLOR: #18578e;TEXT-DECORATION: none } A:visited { COLOR: #777777; TEXT-DECORATION: none } A:active { COLOR: #000000 } A:hover { COLOR: #000000;TEXT-DECORATION: underline overline } BODY { BACKGROUND-COLOR: #eeeeee } input,textarea,select,option{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#2B1F6A;BORDER:1px solid black } select{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#2B1F6A;BORDER:1px solid black } form{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#000000 } TD { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif }

 

 

milliscripts Redirection 1.4 setup - step 2

 

...mySQL connection established and database found!
...all database tables created!

Click on "continue" below.

 

continue
<?php }

###########################

The first setup page

###########################
if ($do == ‚one‘) {
?>

milliscripts Redirection 1.4 Setup A:link { COLOR: #18578e;TEXT-DECORATION: none } A:visited { COLOR: #777777; TEXT-DECORATION: none } A:active { COLOR: #000000 } A:hover { COLOR: #000000;TEXT-DECORATION: underline overline } BODY { BACKGROUND-COLOR: #eeeeee } input,textarea,select,option{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#2B1F6A;BORDER:1px solid black } select{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#2B1F6A;BORDER:1px solid black } form{ FONT-FAMILY:Verdana,Arial,Helvetica;FONT-SIZE:8pt;COLOR:#000000 } TD { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif }

 

 

Welcome to the milliscripts Redirection 1.4 setup!

 

The shown values are the ones you edited in the file "vars.php".
If they are not correct, please edit the variables in "vars.php" and call this page again.
Else click on "continue" below.

 

mySQL Server data

mySQL server host address: <?php echo $mysql_host; ?>
Your mySQL username: <?php echo $mysql_username; ?>
Your mySQL password: <?php echo $mysql_passwd; ?>
mySQL database name: <?php echo $mysql_dbase; ?>

 

Table names

The name of the members table: <?php echo $redir_table; ?>
The name of the options table: <?php echo $options_table; ?>
The name of the domain table: <?php echo $domain_table; ?>
The name of the category table: <?php echo $category_table; ?>
The name of the statistics table: <?php echo $visitor_table; ?>

 

continue

![Valid HTML 4.0!|88x31](upload://bxLYjxKpCzWvgd5etqzIoKqWJWU.png)

<?php } ?>[/code]

„release“ ist ein neues Schlüsselwort in MySQL - du muss es mit release ersetzen. Blöderweise werden auch alle Abfragen, die diesen Spaltennamen referenzieren, fehlschlagen. Bleibt dir nur zu hoffen, dass das Script das nicht direkt tut.

Das heißt also das bplaced MySQL ist auf einer alten version. Was soll ich denn jetzt mit den abfragen, die mit release aufgeführt sind machen?

Und eine neue Fehlermeldung:

Quatsch. Das Script wurde für eine ältere MySQL-Version geschrieben; bplaced ist (fast) up to date. Die neueste Version ist 5.0.51b, bplaced hat 5.0.51a.

Jedenfalls ist „release“ wohl ein neues Schlüsselwort in MySQL 5, sonst hätte der Typ das Feld nie so genannt.

„release“ mit maskieren, also[quote="Scram"]release`[/quote].

wenn du einen guten Editor hast, suchst du einfach alle Scriptdateien nach release ab, und wenn ein Fund in einer SQL-Anweisung steht, änderst du es einfach auf release ab :wink: