Commit bd942c87 by netz.coop eG

2022.01.02 - 20220913 - install / update / kleinigkeiten

1 parent 63932f43
* 2022.01.02 - 20220913 - install / update / kleinigkeiten
* 2022.01.01 - 20220912 - erste Beruehrungen, zB <?php, CONFIG Formatierungen * 2022.01.01 - 20220912 - erste Beruehrungen, zB <?php, CONFIG Formatierungen
\ No newline at end of file
<? <?php
/** /**
* Rechtesystem Erweiterung für BasisElemente um auch Gruppen, Freundeslisten, etc speziell Rechte einzuräumen * Rechtesystem Erweiterung für BasisElemente um auch Gruppen, Freundeslisten, etc speziell Rechte einzuräumen
* *
......
<?php <?php
$var_CONFTG = array( $var_CONFTG = array(
'20220912_Nclist.php' => array( 'author' => 'neumann@netz.coop', 'info' => 'Nc List', 'date' => '220912' ),
'100730_addUrlBCToSocialMovement.php' => array( 'author' => 'um@mensch.coop', 'info' => 'unter SocialMovement auch UrlBE einhängen können', 'date' => '100730' ), '100730_addUrlBCToSocialMovement.php' => array( 'author' => 'um@mensch.coop', 'info' => 'unter SocialMovement auch UrlBE einhängen können', 'date' => '100730' ),
'100730_addUrlBCToEconomy.php' => array( 'author' => 'um@mensch.coop', 'info' => 'unter Economy auch UrlBE einhängen können', 'date' => '100730' ), '100730_addUrlBCToEconomy.php' => array( 'author' => 'um@mensch.coop', 'info' => 'unter Economy auch UrlBE einhängen können', 'date' => '100730' ),
'100624_addCycleToDateBE.php' => array( 'author' => 'um@mensch.coop', 'info' => 'adds Cycle to losp_BE_date Table', 'date' => '100624' ), '100624_addCycleToDateBE.php' => array( 'author' => 'um@mensch.coop', 'info' => 'adds Cycle to losp_BE_date Table', 'date' => '100624' ),
......
...@@ -85,7 +85,7 @@ class MySql extends PDOProtected { ...@@ -85,7 +85,7 @@ class MySql extends PDOProtected {
* Funktion liest Datei ein und führt diese in der Mysql Datenbank aus * Funktion liest Datei ein und führt diese in der Mysql Datenbank aus
* *
* @attention Fehler wenn Kommentarzeichen noch in der selben Zeile ist (z.B. select * -- hier darf kein kommentar stehen) * @attention Fehler wenn Kommentarzeichen noch in der selben Zeile ist (z.B. select * -- hier darf kein kommentar stehen)
* @attention noch nicht PDO * @attention noch nicht PDO @deprecated since version number
* *
* @param string param_FileBE Dateiname * @param string param_FileBE Dateiname
* @return string Fehlerausgabe * @return string Fehlerausgabe
......
...@@ -23,251 +23,245 @@ ...@@ -23,251 +23,245 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
/** /**
* class Install * class Install
* *
*/ */
class Install { class Install {
private $install_text = array('check', 'install','check'); private $install_text = array('check', 'install', 'check');
private $var_false = FALSE; private $var_false = FALSE;
public function __construct($param_DB) { public function __construct($param_DB) {
?> ?>
<html> <html>
<head> <head>
<link rel="stylesheet" type="text/css" <link rel="stylesheet" type="text/css"
href="include/Stylesheet/default_install.css" title="" /> href="include/Forest/netz.coop/Design/old/css/default_install.css" title="" />
</head> </head>
<body> <body>
<span class="Title">LOSP Installation</span> <span class="Title">LOSP Installation</span>
<!-- Menu --> <!-- Menu -->
<span class="Menu"> <span class="Button"><a href="install.php">Menu</a></span> <span class="Menu"> <span class="Button"><a href="install.php">Menu</a></span>
<?php <?php
for($i=0;$i<count($this->install_text);$i++) { for ($i = 0; $i < count($this->install_text); $i++) {
?> <span class="Button"><a ?> <span class="Button"><a
href="install.php?step=<?=$this->install_text[$i] ?>"><?=$i ?>. <?=$this->install_text[$i] ?></a></span> href="install.php?step=<?php echo $this->install_text[$i] ?>"><?php echo $i ?>. <?php echo $this->install_text[$i];?></a></span>
<?php <?php
} }
?> </span> ?> </span>
<!-- Screen --> <!-- Screen -->
<span class="Screen"> <? <span class="Screen"> <?php
// Check the System // Check the System
if($_GET["step"]==$this->install_text[0]) { if ($_GET["step"] == $this->install_text[0]) {
?> <span class="Box"> <span class="Title">Server System: (Allgemein)</span> ?> <span class="Box"> <span class="Title">Server System: (Allgemein)</span>
<!-- MySQL --> <span class="row"> <span class="var">MySQL</span> <? if(extension_loaded("MySQL")) {
echo "<span class=\"value\">OK</span>";
} else {
$this->var_false = TRUE;
echo "<span class=\"value\">MySQL Modul ist nicht geladen, Installation nicht m&ouml;glich</span>";
}
?> </span> <!-- PHP --> <span class="row"> <span class="var">PHP</span>
<? $version = explode('.', phpversion());
if(((int) $version[0])>=5) {
echo "<span class=\"value\">OK Version ist aussreichend (".phpversion().">5)</span>";
} else {
$this->var_false = TRUE;
echo "<span class=\"value\"><b>eine zu alte PHP Version (".phpversion()."<5)</b></span>";
}
?> </span> <!-- XSL --> <span class="row"> <span class="var">XSL</span>
<? if(extension_loaded("XSL")) {
echo "<span class=\"value\">OK</span>";
} else {
$this->var_false = TRUE;
echo "<span class=\"value\">XSL Modul ist nicht geladen, Installation nicht m&ouml;glich</span>";
}
?> </span> </span> <?
if(!$this->var_false) {
?> <span class="Box"> <span class="Title">Datenbank Benutzer Daten:</span>
<br> <!-- MySQL --> <span class="row"> <span class="var">MySQL</span> <?php
<p class=install>Bitte die Datei config/config.php mit den if (extension_loaded("MySQL")) {
Datenbankdaten f&uuml;llen</p> echo "<span class=\"value\">OK</span>";
<p class=install>Folgende Daten werden beim n&auml;chsten Schritt } else {
verwendet</p> $this->var_false = TRUE;
echo "<span class=\"value\">MySQL Modul ist nicht geladen, Installation nicht m&ouml;glich</span>";
}
?> </span> <!-- PHP --> <span class="row"> <span class="var">PHP</span>
<?php
$version = explode('.', phpversion());
if (((int) $version[0]) >= 5) {
echo "<span class=\"value\">OK Version ist aussreichend (" . phpversion() . ">5)</span>";
} else {
$this->var_false = TRUE;
echo "<span class=\"value\"><b>eine zu alte PHP Version (" . phpversion() . "<5)</b></span>";
}
?> </span> <!-- XSL --> <span class="row"> <span class="var">XSL</span>
<?php
if (extension_loaded("XSL")) {
echo "<span class=\"value\">OK</span>";
} else {
$this->var_false = TRUE;
echo "<span class=\"value\">XSL Modul ist nicht geladen, Installation nicht m&ouml;glich</span>";
}
?> </span> </span> <?php
if (!$this->var_false) {
?> <span class="Box"> <span class="Title">Datenbank Benutzer Daten:</span>
<span class="row"><span class="var">MySQL:</span></span> <span <br>
class="row"><span class="var">Server:</span> <span class="value">"<?=$param_DB["config_dbserver"]?>"</span></span> <p class=install>Bitte die Datei config/config.php mit den
<span class="row"><span class="var">Benutzer:</span><span class="value">"<?=$param_DB["config_user"] ?>"</span></span> Datenbankdaten f&uuml;llen</p>
<span class="row"><span class="var">Passwort:</span><span class="value">"<?=$param_DB["config_passwd"] ?>"</span></span> <p class=install>Folgende Daten werden beim n&auml;chsten Schritt
<span class="row"><span class="var">Datenbank:</span><span class="value">"<?=$param_DB["config_db"] ?>"</span></span> verwendet</p>
</span> <?
$link = mysql_connect($param_DB["config_dbserver"], $param_DB["config_user"], $param_DB["config_passwd"]);
if ($link) {
?> <span class="Box"> <span class="Title">MySQL Datenbank</span> <span
class="row"><span class="var">Version:</span> <span class="value"><?=mysql_get_server_info() ?></span></span>
<span class="row"><span class="var">Host:</span> <span class="value"><?=mysql_get_host_info() ?></span></span>
<span class="row"><span class="var">Client:</span> <span class="value"><?=mysql_get_client_info() ?></span></span>
</span> <span class="Box"> <span class="Title">spezielle Datenbank
Rechte</span> <?
$query = "SELECT * FROM information_schema.`USER_PRIVILEGES` where GRANTEE=\"'".$param_DB["config_user"]."'@'".$param_DB["config_dbserver"]."'\" and PRIVILEGE_TYPE='ALTER ROUTINE';"; <span class="row"><span class="var">MySQL:</span></span> <span
$this->resource = mysql_db_query($param_DB["config_db"], $query); class="row"><span class="var">Server:</span> <span class="value">"<?php echo $param_DB["config_dbserver"] ?>"</span></span>
$row = mysql_fetch_array($this->resource); <span class="row"><span class="var">Benutzer:</span><span class="value">"<?php echo $param_DB["config_user"] ?>"</span></span>
?> <span class="row"> <span class="value">(Alter Routine: <? <span class="row"><span class="var">Passwort:</span><span class="value">"***"</span></span>
if($row["PRIVILEGE_TYPE"]!="ALTER ROUTINE") { <span class="row"><span class="var">Datenbank:</span><span class="value">"<?php echo $param_DB["config_db"] ?>"</span></span>
$var_false = TRUE; </span> <?php
echo "Fehler"; $link = mysql_connect($param_DB["config_dbserver"], $param_DB["config_user"], $param_DB["config_passwd"]);
} else { if ($link) {
echo "OK"; ?> <span class="Box"> <span class="Title">MySQL Datenbank</span> <span
} class="row"><span class="var">Version:</span> <span class="value"><?php echo mysql_get_server_info() ?></span></span>
?> )</span> </span> <? <span class="row"><span class="var">Host:</span> <span class="value"><?php echo mysql_get_host_info() ?></span></span>
$query = "SELECT * FROM information_schema.`USER_PRIVILEGES` where GRANTEE=\"'".$param_DB["config_user"]."'@'".$param_DB["config_dbserver"]."'\" and PRIVILEGE_TYPE='CREATE ROUTINE';"; <span class="row"><span class="var">Client:</span> <span class="value"><?php echo mysql_get_client_info() ?></span></span>
</span> <span class="Box"> <span class="Title">spezielle Datenbank
Rechte</span> <?php
$query = "SELECT * FROM information_schema.`USER_PRIVILEGES` where GRANTEE=\"'" . $param_DB["config_user"] . "'@'" . $param_DB["config_dbserver"] . "'\" and PRIVILEGE_TYPE='ALTER ROUTINE';";
$this->resource = mysql_db_query($param_DB["config_db"], $query);
$row = mysql_fetch_array($this->resource);
?> <span class="row"> <span class="value">(Alter Routine: <?php
if ($row["PRIVILEGE_TYPE"] != "ALTER ROUTINE") {
$var_false = TRUE;
echo "Fehler";
} else {
echo "OK";
}
?> )</span> </span> <?php
$query = "SELECT * FROM information_schema.`USER_PRIVILEGES` where GRANTEE=\"'" . $param_DB["config_user"] . "'@'" . $param_DB["config_dbserver"] . "'\" and PRIVILEGE_TYPE='CREATE ROUTINE';";
// echo "<li>".$query."</li>"; // echo "<li>".$query."</li>";
$this->resource = mysql_db_query($param_DB["config_db"], $query); $this->resource = mysql_db_query($param_DB["config_db"], $query);
$row = mysql_fetch_array($this->resource); $row = mysql_fetch_array($this->resource);
?> <span class="row"> <span class="value">Create Routine: <? ?> <span class="row"> <span class="value">Create Routine: <?php
if($row["PRIVILEGE_TYPE"]!="CREATE ROUTINE") { if ($row["PRIVILEGE_TYPE"] != "CREATE ROUTINE") {
$var_false = TRUE; $var_false = TRUE;
echo "Fehler"; echo "Fehler";
} else { } else {
echo "OK"; echo "OK";
} }
?> </span> </span> <? ?> </span> </span> <?php
if ($row["PRIVILEGE_TYPE"] == "CREATE ROUTINE") {
?> <span class="row"> <span class="var">Test: Erstelle Test Funktion:</span>
if($row["PRIVILEGE_TYPE"]=="CREATE ROUTINE") { <span class="value"> <?php
$sql_fnc = "DROP FUNCTION IF EXISTS testing";
$this->resource = mysql_db_query($param_DB["config_db"], $sql_fnc);
?> <span class="row"> <span class="var">Test: Erstelle Test Funktion:</span> $sql_fnc = "CREATE FUNCTION testing(param_test int)
<span class="value"> <?
$sql_fnc = "DROP FUNCTION IF EXISTS testing";
$this->resource = mysql_db_query($param_DB["config_db"], $sql_fnc);
$sql_fnc = "CREATE FUNCTION testing(param_test int)
RETURNS INT RETURNS INT
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN
return param_test; return param_test;
END"; END";
$this->resource = mysql_db_query($param_DB["config_db"], $sql_fnc); $this->resource = mysql_db_query($param_DB["config_db"], $sql_fnc);
if(!mysql_error()) {
echo "OK ";
echo mysql_error();
?> </span> <?
} else {
echo "Fehler: ";
echo mysql_error();
?> </span> <?
if(strripos(mysql_error(), "log_bin_trust_function_creators")) {
$query = "show variables like 'log_bin_trust_function_creators'"; if (!mysql_error()) {
$this->resource = mysql_db_query($param_DB["config_db"], $query); echo "OK ";
$row = mysql_fetch_array($this->resource); echo mysql_error();
?> </span> <?php
} else {
echo "Fehler: ";
echo mysql_error();
?> </span> <?php
if (strripos(mysql_error(), "log_bin_trust_function_creators")) {
if($row["Value"]=="ON") { $query = "show variables like 'log_bin_trust_function_creators'";
echo "log_bin_trust_function_creators: = ".$row["Value"]."<br>"; $this->resource = mysql_db_query($param_DB["config_db"], $query);
$row = mysql_fetch_array($this->resource);
} else { if ($row["Value"] == "ON") {
$var_false = TRUE; echo "log_bin_trust_function_creators: = " . $row["Value"] . "<br>";
?> <span class="row"> <span class="value">log_bin_trust_function_creators: } else {
= <?=$row["Value"] ?></span> </span> <span class="row"> <span $var_false = TRUE;
class="value">in der Datenbank k&ouml;nnen keine Funktionen angelegt ?> <span class="row"> <span class="value">log_bin_trust_function_creators:
werden</span> </span> <span class="row"> <span class="value">Sie = <?php echo $row["Value"] ?></span> </span> <span class="row"> <span
m&uuml;ssen die globale Systemvariable log_bin_trust_function_creators class="value">in der Datenbank k&ouml;nnen keine Funktionen angelegt
auf 1 setzen.<br> werden</span> </span> <span class="row"> <span class="value">Sie
[mysql> SET GLOBAL log_bin_trust_function_creators = 1;]</span> </span> m&uuml;ssen die globale Systemvariable log_bin_trust_function_creators
<? auf 1 setzen.<br>
} [mysql> SET GLOBAL log_bin_trust_function_creators = 1;]</span> </span>
} <?php
} }
?> <span class="row"> <span class="var">Test: Erstelle Test Prozedur:</span> }
<span class="value"> <? }
?> <span class="row"> <span class="var">Test: Erstelle Test Prozedur:</span>
<span class="value"> <?php
// $link = mysql_connect($param_DB["config_dbserver"], $param_DB["config_user"], $param_DB["config_passwd"]); // $link = mysql_connect($param_DB["config_dbserver"], $param_DB["config_user"], $param_DB["config_passwd"]);
$sql_fnc = "DROP PROCEDURE IF EXISTS testing"; $sql_fnc = "DROP PROCEDURE IF EXISTS testing";
$this->resource = mysql_db_query($param_DB["config_db"], $sql_fnc); $this->resource = mysql_db_query($param_DB["config_db"], $sql_fnc);
$sql_fnc = "CREATE PROCEDURE testing(IN param_test int) DETERMINISTIC BEGIN END"; $sql_fnc = "CREATE PROCEDURE testing(IN param_test int) DETERMINISTIC BEGIN END";
$this->resource = mysql_db_query($param_DB["config_db"], $sql_fnc); $this->resource = mysql_db_query($param_DB["config_db"], $sql_fnc);
if(!mysql_error()) { if (!mysql_error()) {
echo "OK "; echo "OK ";
echo mysql_error(); echo mysql_error();
} else { } else {
echo "Fehler: "; echo "Fehler: ";
echo mysql_error(); echo mysql_error();
} }
?> </span> </span> <? ?> </span> </span> <?php
} else {
$var_false = TRUE;
?> <span class="row"> <span class="var">Erstelle Test
Funktion/Procedure:</span> <span class="value">No</span> </span> <span
class="row"> <span class="var">PRIVILEGE_TYPE:</span> <span
class="value">No</span> </span> <span class="row"><span class="value">
<b>in der Datenbank k&ouml;nnen keine Funktionen angelegt werden
(fehlende Rechte)</b> </span></span> <span class="row"> <span
class="var">externe Dokumentation:</span> <span class="value"><a
href="http://dev.mysql.com/doc/refman/5.1/de/create-procedure.html">MySQL
5.1 Referenzhandbuch 19.2.1. CREATE PROCEDURE und CREATE FUNCTION</a></span>
</span> <span class="row"> <span class="var">Anleitung:</span> <span
class="value">Als priviligierter MySQL Administrator folgende Rechte
dem Nutzer und der Datenbank zur Verf&uuml;gung stellen</span> </span> <span
class="row"><span class="value"> <!-- mysql> <i>UPDATE mysql.`db` SET `Create_routine_priv` = 'Y', `Alter_routine_priv` = 'Y' WHERE CONVERT( `Db` USING utf8 ) = '<?php echo $param_DB["config_db"] ?>' AND CONVERT( `User` USING utf8 ) = '<?php echo $param_DB["config_user"] ?>';</i> -->
<!-- mysql> <i>UPDATE `mysql`.`db` SET `Host` = 'localhost', `Select_priv` = 'Y', `Insert_priv` = 'Y', `Update_priv` = 'Y', `Delete_priv` = 'Y', `Create_priv` = 'Y', `Drop_priv` = 'Y', `Reload_priv` = 'Y', `Create_view_priv` = 'Y', `Show_view_priv` = 'Y', `Create_routine_priv` = 'Y', `Alter_routine_priv` = 'Y' WHERE CONVERT( `Db` USING utf8 ) = '<?php echo $param_DB["config_db"] ?>' AND `user`.`User`= '<?php echo $param_DB["config_user"] ?>' LIMIT 1 ;</i> -->
mysql> <i>UPDATE `mysql`.`db` SET `Host` = 'localhost', `Select_priv` =
'Y', `Insert_priv` = 'Y', `Update_priv` = 'Y', `Delete_priv` = 'Y',
`Create_priv` = 'Y', `Drop_priv` = 'Y', `Create_view_priv` = 'Y',
`Show_view_priv` = 'Y', `Create_routine_priv` = 'Y',
`Alter_routine_priv` = 'Y' WHERE CONVERT( `Db` USING utf8 ) = '<?php echo $param_DB["config_db"] ?>'
AND `User`= '<?php echo $param_DB["config_user"] ?>' LIMIT 1 ;</i> </span></span>
} else { <span class="row"><span class="value"> <!-- mysql> UPDATE mysql.user SET Create_routine_priv='Y', Alter_routine_priv='Y', ssl_cipher='', x509_issuer='', x509_subject='' WHERE CONVERT(Host USING utf8 )='<?php echo $param_DB["config_dbserver"] ?>' AND CONVERT(User USING utf8 )='<?php echo $param_DB["config_user"] ?>' LIMIT 1; -->
$var_false = TRUE; mysql> <i>UPDATE `mysql`.`user` SET `Host` = 'localhost', `Select_priv`
?> <span class="row"> <span class="var">Erstelle Test = 'Y', `Insert_priv` = 'Y', `Update_priv` = 'Y', `Delete_priv` = 'Y',
Funktion/Procedure:</span> <span class="value">No</span> </span> <span `Create_priv` = 'Y', `Drop_priv` = 'Y', `Reload_priv` = 'Y',
class="row"> <span class="var">PRIVILEGE_TYPE:</span> <span `Create_view_priv` = 'Y', `Show_view_priv` = 'Y', `Create_routine_priv`
class="value">No</span> </span> <span class="row"><span class="value"> = 'Y', `Alter_routine_priv` = 'Y' WHERE `user`.`User`= '<?php echo $param_DB["config_user"] ?>'
<b>in der Datenbank k&ouml;nnen keine Funktionen angelegt werden LIMIT 1 ;</i> </span></span> <span class="row"><span class="value">
(fehlende Rechte)</b> </span></span> <span class="row"> <span mysql> <i>FLUSH PRIVILEGES ;</i> </span></span> <?php
class="var">externe Dokumentation:</span> <span class="value"><a }
href="http://dev.mysql.com/doc/refman/5.1/de/create-procedure.html">MySQL ?> </span> <span class="Box"> <span class="Title">Resultat</span> <?php
5.1 Referenzhandbuch 19.2.1. CREATE PROCEDURE und CREATE FUNCTION</a></span> if ($var_false) {
</span> <span class="row"> <span class="var">Anleitung:</span> <span ?> <span class="row"> <a
class="value">Als priviligierter MySQL Administrator folgende Rechte href="install.php?step=<?php echo $this->install_text[0] ?>" class=install>noch
dem Nutzer und der Datenbank zur Verf&uuml;gung stellen</span> </span> <span mal [Schritt 1]</a> </span> <?php
class="row"><span class="value"> <!-- mysql> <i>UPDATE mysql.`db` SET `Create_routine_priv` = 'Y', `Alter_routine_priv` = 'Y' WHERE CONVERT( `Db` USING utf8 ) = '<?=$param_DB["config_db"]?>' AND CONVERT( `User` USING utf8 ) = '<?=$param_DB["config_user"]?>';</i> --> } else {
<!-- mysql> <i>UPDATE `mysql`.`db` SET `Host` = 'localhost', `Select_priv` = 'Y', `Insert_priv` = 'Y', `Update_priv` = 'Y', `Delete_priv` = 'Y', `Create_priv` = 'Y', `Drop_priv` = 'Y', `Reload_priv` = 'Y', `Create_view_priv` = 'Y', `Show_view_priv` = 'Y', `Create_routine_priv` = 'Y', `Alter_routine_priv` = 'Y' WHERE CONVERT( `Db` USING utf8 ) = '<?=$param_DB["config_db"]?>' AND `user`.`User`= '<?=$param_DB["config_user"]?>' LIMIT 1 ;</i> --> ?> <span class="row"> <a
mysql> <i>UPDATE `mysql`.`db` SET `Host` = 'localhost', `Select_priv` = href="install.php?step=<?php echo $this->install_text[1] ?>" class=install>weiter
'Y', `Insert_priv` = 'Y', `Update_priv` = 'Y', `Delete_priv` = 'Y', [Schritt 1]</a> (Tabellen werden erstellt) </span> <?php
`Create_priv` = 'Y', `Drop_priv` = 'Y', `Create_view_priv` = 'Y', }
`Show_view_priv` = 'Y', `Create_routine_priv` = 'Y', ?> </span> <?php
`Alter_routine_priv` = 'Y' WHERE CONVERT( `Db` USING utf8 ) = '<?=$param_DB["config_db"]?>' } else {
AND `User`= '<?=$param_DB["config_user"]?>' LIMIT 1 ;</i> </span></span> echo "<b>Ueberpr&uuml;fen sie die Daten f&uuml;r die Datenbankverbindung config/config.php</b><br>";
echo "<a href=\"?install=2\" class=install>zur&uuml;ck [Schritt 2]</a><br>";
<span class="row"><span class="value"> <!-- mysql> UPDATE mysql.user SET Create_routine_priv='Y', Alter_routine_priv='Y', ssl_cipher='', x509_issuer='', x509_subject='' WHERE CONVERT(Host USING utf8 )='<?=$param_DB["config_dbserver"]?>' AND CONVERT(User USING utf8 )='<?=$param_DB["config_user"]?>' LIMIT 1; --> echo('Keine Verbindung m&ouml;glich: ' . mysql_error());
mysql> <i>UPDATE `mysql`.`user` SET `Host` = 'localhost', `Select_priv` ?> <span class="Box"> <span class="row"> <b>evt. soll vielleicht auch
= 'Y', `Insert_priv` = 'Y', `Update_priv` = 'Y', `Delete_priv` = 'Y', alles erst angelegt werden</b> </span> <span class="row"> rechner:/$ <i>mysql
`Create_priv` = 'Y', `Drop_priv` = 'Y', `Reload_priv` = 'Y', -u root --password='Passwort'</i> </span> <span class="row"> mysql> <i>create
`Create_view_priv` = 'Y', `Show_view_priv` = 'Y', `Create_routine_priv` database lospdb;</i> </span> <span class="row"> mysql> <i>GRANT ALL
= 'Y', `Alter_routine_priv` = 'Y' WHERE `user`.`User`= '<?=$param_DB["config_user"]?>' PRIVILEGES ON lospdb.* TO lospuser IDENTIFIED BY 'losppassword';</i> </span>
LIMIT 1 ;</i> </span></span> <span class="row"><span class="value"> </span> <?php
mysql> <i>FLUSH PRIVILEGES ;</i> </span></span> <? }
} }
?> </span> <span class="Box"> <span class="Title">Resultat</span> <? } else if ($_GET["step"] == $this->install_text[1]) {
$DB = StorableFactory::create("MySql", $param_DB);
echo $DB->transformFileToDatabase("include/System/sql/MySql_Tables.sql");
if($var_false) { echo $DB->transformFileToDatabase("include/System/sql/MySql_Function.sql");
?> <span class="row"> <a } else {
href="install.php?step=<?=$this->install_text[0] ?>" class=install>noch
mal [Schritt 1]</a> </span> <? }
} else { ?> </span>
?> <span class="row"> <a </body>
href="install.php?step=<?=$this->install_text[1] ?>" class=install>weiter </html>
[Schritt 1]</a> (Tabellen werden erstellt) </span> <? <?php
} }
?> </span> <?
} else {
echo "<b>Ueberpr&uuml;fen sie die Daten f&uuml;r die Datenbankverbindung config/config.php</b><br>";
echo "<a href=\"?install=2\" class=install>zur&uuml;ck [Schritt 2]</a><br>";
echo('Keine Verbindung m&ouml;glich: ' . mysql_error());
?> <span class="Box"> <span class="row"> <b>evt. soll vielleicht auch
alles erst angelegt werden</b> </span> <span class="row"> rechner:/$ <i>mysql
-u root --password='Passwort'</i> </span> <span class="row"> mysql> <i>create
database lospdb;</i> </span> <span class="row"> mysql> <i>GRANT ALL
PRIVILEGES ON lospdb.* TO lospuser IDENTIFIED BY 'losppassword';</i> </span>
</span> <?
}
}
} else if($_GET["step"]==$this->install_text[1]) {
$DB = StorableFactory::create("MySql", $param_DB);
echo $DB->transformFileToDatabase("include/sql/MySQL_Tables.sql");
echo $DB->transformFileToDatabase("include/sql/MySQL_Function.sql");
} else {
}
?> </span>
</body>
</html>
<?
}
}
?> }
\ No newline at end of file
\ No newline at end of file
...@@ -114,15 +114,15 @@ select 'generate Accounts'; ...@@ -114,15 +114,15 @@ select 'generate Accounts';
-- insertProfile(param_NickName varchar(20), param_EMail varchar(256), param_Fingerprint varchar(42), param_Jabber varchar(256), param_Url varchar(2048), param_Subject varchar(512), param_Text text, param_Name varchar(20), param_private boolean, param_Avatar varchar(2048), param_Signature text(2048)) -- insertProfile(param_NickName varchar(20), param_EMail varchar(256), param_Fingerprint varchar(42), param_Jabber varchar(256), param_Url varchar(2048), param_Subject varchar(512), param_Text text, param_Name varchar(20), param_private boolean, param_Avatar varchar(2048), param_Signature text(2048))
INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode) INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode)
-- insertProfile( 'GroupProfileBE',param_NickName, param_EMail, param_Fingerprint, param_Jabber, param_Url, param_Subject, param_Text, param_LanguageCode, param_Name, param_private, param_Avatar, param_Signature)) -- insertProfile( 'GroupProfileBE',param_NickName, param_EMail, param_Fingerprint, param_Jabber, param_Url, param_Subject, param_Text, param_LanguageCode, param_Name, param_private, param_Avatar, param_Signature))
VALUES ('1', SHA1('xxxxxxxxx'), 'netz.coop', 'j', (SELECT insertProfile( 'Profile', 'netzcoop', 'kontakt@netz.coop', '', '', 'http://netz.coop','netz.coop e.G.','netz.coop Beschreibungstext', 'deu', 'liamPage', 0,'','')), 'netz@mensch.coop', 'Badeler Dorfstr.', '10', 'Kalbe M.', '39624'); VALUES ('1', SHA1('Passw0rd'), 'netz.coop', 'j', (SELECT insertProfile( 'Profile', 'netzcoop', 'kontakt@netz.coop', '', '', 'http://netz.coop','netz.coop e.G.','netz.coop Beschreibungstext', 'deu', 'liamPage', 0,'','')), 'netz@mensch.coop', 'Badeler Dorfstr.', '10', 'Kalbe M.', '39624');
INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode) INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode)
VALUES ('2', SHA1('xxxxxxxxx'), 'Erna', 'Testing.', (SELECT insertProfile('Profile','test1', 'test1@mensch.coop', '', '', '','Erna Testing. Profile Subject','erna bla bal bla text', 'deu', 'Test1Page', 0, '', '')), 'test1@mensch.coop', 'Teststr.', '212', 'Osnabrueck', '49088'); VALUES ('2', SHA1('Passw0rd'), 'Erna', 'Testing.', (SELECT insertProfile('Profile','test1', 'test1@mensch.coop', '', '', '','Erna Testing. Profile Subject','erna bla bal bla text', 'deu', 'Test1Page', 0, '', '')), 'test1@mensch.coop', 'Teststr.', '212', 'Osnabrueck', '49088');
INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode) INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode)
VALUES ('3', SHA1('xxxxxxxxx'), 'Paul', 'Testing.', (SELECT insertProfile('Profile','test2', 'test2@mensch.coop', '', '', '','Paul Testing. Profile Subject','Paul bla bal bla Beschreibungstext', 'deu', 'Test2Page', 0,'','')), 'test2@mensch.coop', 'Newmanstr.', '21', 'Osnabrueck', '49088'); VALUES ('3', SHA1('Passw0rd'), 'Paul', 'Testing.', (SELECT insertProfile('Profile','test2', 'test2@mensch.coop', '', '', '','Paul Testing. Profile Subject','Paul bla bal bla Beschreibungstext', 'deu', 'Test2Page', 0,'','')), 'test2@mensch.coop', 'Newmanstr.', '21', 'Osnabrueck', '49088');
INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode) INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode)
VALUES ('4', SHA1('xxxxxxxxx'), 'Elfriede', 'Testing.', (SELECT insertProfile('Profile','test3','test3@mensch.coop', '', '', '','Elfriede Testing. Profile Subject','elfriede bla bal bla Beschreibungstext', 'deu', 'Test3Page', 0,'','' )), 'test3@mensch.coop', 'Newwomanstr.', '12', 'Hannover', '44023'); VALUES ('4', SHA1('Passw0rd'), 'Elfriede', 'Testing.', (SELECT insertProfile('Profile','test3','test3@mensch.coop', '', '', '','Elfriede Testing. Profile Subject','elfriede bla bal bla Beschreibungstext', 'deu', 'Test3Page', 0,'','' )), 'test3@mensch.coop', 'Newwomanstr.', '12', 'Hannover', '44023');
INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode) INSERT INTO losp_be_account (ID,Password,Firstname,SurName,ProfileID,EMail,Street,Streetnumber,City,ZipCode)
VALUES ('5', SHA1('xxxxxxxxx'), 'Dietrich', 'Testing.', (SELECT insertProfile('Profile','test4','test4@mensch.coop', '', '', '','Dietrich Testing. Profile Subject','Dietrich bla bal bla Beschreibungstext', 'deu', 'Test4Page', 0,'','' )), 'test4@mensch.coop', 'Newwomanstr.', '12', 'Hannover', '44023'); VALUES ('5', SHA1('Passw0rd'), 'Dietrich', 'Testing.', (SELECT insertProfile('Profile','test4','test4@mensch.coop', '', '', '','Dietrich Testing. Profile Subject','Dietrich bla bal bla Beschreibungstext', 'deu', 'Test4Page', 0,'','' )), 'test4@mensch.coop', 'Newwomanstr.', '12', 'Hannover', '44023');
INSERT INTO losp_BEBasisClipboardsRightManagement ( INSERT INTO losp_BEBasisClipboardsRightManagement (
`PartOfID` , `PartOfID` ,
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
require_once("include/php/config/config.php"); //require_once("include/php/config/config.php");
require_once("include/config.php");
require_once("include/System/php/RequireClass.inc.php"); require_once("include/System/php/RequireClass.inc.php");
$var_Install = new Install($_DB); $var_Install = new Install($_LOSP_STORABLE_DATA);
?>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!