Ir para conteúdo
  • Cadastre-se

[AJUDA] Erro de IP no install.txt do Gesior


Posts Recomendados


<?php




/*
#### Installer PHP  1.5 ####
#### Author: Kay Vogelgesang & Carsten Wiedmann for www.apachefriends.org 2005 ####
*/


/// Where I stand? ///
$curdir = getcwd();
  $usbstick="0";
  
  if ( $_SERVER["argv"][1] == "usb" ) {
            // echo   $_SERVER["argv"][1];
            $usbstick="1";
            echo "\r\n  ########################################################################\n";
echo "  #                                                                      #\r\n";
echo "  #                  XAMPP USB Stick Installation                        #\r\n";;
echo "  #                                                                      #\r\n";
echo "  ########################################################################\r\n\r\n";
  }






list($partition, $nonpartition) = preg_split ("/:/", $curdir); //Fix by Wiedmann
$partwampp = substr(realpath(__FILE__), 0, strrpos(dirname(realpath(__FILE__)), '\\'));


$directorwampp = NULL;                                                  
if ($usbstick == "1" ) {
  $dirpartwampp=$nonpartition;
  } else {
   $dirpartwampp=$partwampp;
  }
$awkpart = str_replace("&", "\\\\&", eregi_replace ("\\\\", "\\\\", $dirpartwampp)); //Fix by Wiedmann
$awkpartslash = str_replace("&", "\\\\&", ereg_replace ("\\\\", "/", $dirpartwampp)); //Fix by Wiedmann


   
// Only debug
  // echo $partition."\n";
//  echo $nonpartition."\n";
// echo $partwampp."\n\n";
          // echo $awkpart."\n"; 
   // echo $awkpartslash."\n";
         // exit; 


  $phpdir = $partwampp;
$dir = ereg_replace("\\\\", "/", $partwampp);
$ppartition = "$partition:";


/// I need the install.sys + update.sys for more xampp informations
$installsys = "install.sys";
$installsysroot = $partwampp."\install\\".$installsys;


/// Some addon|update.sys files
$perlupdatesys = "perlupdate.sys";
$pythonupdatesys = "pythonupdate.sys";
$serverupdatesys = "serverupdate.sys";
$utilsupdatesys = "utilsupdate.sys";
$javaupdatesys = "javaupdate.sys";
$otherupdatesys = "otherupdate.sys";


/// XAMPP main directrory is ...
$substit = "\\\\\\\\xampp";
$substitslash = "/xampp";


/// Globale variables
$BS = 0;
$CS = 0;
$slashi = 1;
$bslashi = 1;
$awkexe = ".\install\awk.exe";
$awk = ".\install\config.awk";
$awknewdir = "\"".$awkpart."\"";
$awkslashdir = "\"".$awkpartslash."\"";
if (file_exists("$partwampp\htdocs\\xampp\.version")) {
$handle = fopen("$partwampp\htdocs\\xampp\.version","r");
  $xamppversion = fgets($handle);
  fclose($handle);
} else {
$xamppversion = "?.?.?";
    // include_once "$partwampp\install\.version";
  }
  date_default_timezone_set('UTC');
echo "\r\n  ########################################################################\n";
echo "  # ApacheFriends XAMPP setup win32 Version                              #\r\n";
echo "  #----------------------------------------------------------------------#\r\n";
echo "  # Copyright (c) 2002-".date("Y")." Apachefriends $xamppversion                          #\r\n";
echo "  #----------------------------------------------------------------------#\r\n";
echo "  # Authors: Kay Vogelgesang <[email protected]>                     #\r\n";
echo "  #          Carsten Wiedmann <[email protected]>             #\r\n";
echo "  ########################################################################\r\n\r\n";


$confhttpdroot = $partwampp."\apache\\conf\\httpd.conf";


// Find the install status for xampp basic package in the install.sys file
if (file_exists($installsysroot)) {
$i = 0;
$datei = fopen($installsysroot, 'r');
while (!feof($datei)) {
$zeile = fgets($datei, 255);
if ( $zeile == "usbstick = 1" ) {
        echo "  USB stick installation found! Using relative paths by default ($nonpartition).";
          $dirpartwampp=$nonpartition;
          $usbstick="1";
          $partwampp=$nonpartition;
        //exit;
      } 
$sysroot[] = $zeile;
$i += 1;
}
fclose($datei);


$sysroot[2] = str_replace('perl', 'server', $sysroot[2]); // Fix by Wiedmann
file_put_contents($installsysroot, implode('', $sysroot));


list($left, $right) = preg_split ("/ = /", $sysroot[0]);
$right = eregi_replace ("\r\n", "", $right);
if (strtolower($partwampp) == strtolower($right)) {
$xamppinstaller = "nothingtodo";
} else {
$xamppinstaller = "newpath";
$substit = eregi_replace ("\\\\", "\\\\\\\\", $right);
$substitslash = eregi_replace("\\\\", "/", $right);
}
} else {
$installsys = fopen($installsysroot, 'w');
if ( $usbstick == "1" ) {
$wamppinfo = "DIR = $nonpartition\r\nxampp = $xamppversion\r\nserver = 0\r\nperl = 0\r\npython = 0\r\nutils = 0\r\njava = 0\r\nother = 0\r\nusbstick = $usbstick";
} else {
    $wamppinfo = "DIR = $partwampp\r\nxampp = $xamppversion\r\nserver = 0\r\nperl = 0\r\npython = 0\r\nutils = 0\r\njava = 0\r\nother = 0\r\nusbstick = $usbstick";
    }
    fputs($installsys, $wamppinfo);
fclose($installsys);
$xamppinstaller = "newinstall";
}


/// Find some *update.sys files and modify the install.sys ...
$path = $partwampp."\install\\";
$hdl = opendir($path);
while ($res = readdir($hdl)) { //Searching all xampp sys files
$array[] = $res;
}
closedir($hdl);
$werte = count($array);
for ($q = 2; $q < $werte; $q++) {
if (($array[$q] == $perlupdatesys) || ($array[$q] == $pythonupdatesys) || ($array[$q] == $serverupdatesys) || ($array[$q] == $utilsupdatesys) || ($array[$q] == $javaupdatesys) || ($array[$q] == $otherupdatesys)) {
$updatesysroot = $partwampp."\install\\".$array[$q];
if (file_exists($updatesysroot)) {
$datei = fopen($updatesysroot, 'r');
unset($updatezeile);


$i = 0;
while (!feof($datei)) {
$zeile = fgets($datei, 255);
$updatezeile[] = $zeile;
@list($left, $right) = preg_split("/=/", $updatezeile[0]);
$left = eregi_replace(" ", "", $left);
$left = eregi_replace("\r\n", "", $left);
$right = eregi_replace("\r\n", "", $right);
$update = $left;
$update = strtolower($update);
$updateversion = trim($right);
$updateversionzahl = preg_split('|[.-]|', $updateversion); // Fix by Wiedmann
if (!isset($updateversionzahl[3])) {
$updateversionzahl[3] = '';
}
$updateinc = "xampp".$update.".inc";
$updateconf = $update.".conf";


$i++;
}
fclose($datei);
        // echo "  Configure for $update $updateversion\r\n";
        // echo "  Configure for Version $xamppversion\r\n";
if (file_exists($installsysroot)) {
$datei = fopen($installsysroot, 'r');
unset($newzeile);
$i = 0;
while (!feof($datei)) {
$zeile = fgets($datei, 255);
$newzeile[] = $zeile;
$i++;
}
fclose($datei);


/// Analyze install.sys to *update.syse for todo 


//// Vogelgesang 28.12.2005 => Must take old Section for addon functality
$datei = fopen($installsysroot,'w'); 
        if($datei) 
            { 
                for($z=0;$z<$i+1;$z++) 
                { 
if (0 === stripos(trim($newzeile[$z]), trim($update))) // Fix by Wiedmann


{
list ($left, $right) = preg_split ("/=/", $newzeile[$z]);


$left = eregi_replace (" ","",$left);
$left = eregi_replace ("\r\n","",$left);
$right = trim(eregi_replace ("\r\n","",$right));
$currentversionzahl = eregi_replace ("\.","",sprintf('%0-6s',$right)); // Fix by Wiedmann
if ($currentversionzahl == 0 )
{
$updatemake="makenew"; // New installation
$putnew="$update = $updateversion\r\n";
fputs($datei, $putnew);
}
elseif ($currentversionzahl < $updateversionzahl)
{
$updatemake="update";  // Update installation
$putnew="$update = $updateversion\r\n";  //Fix by Wiedmann
fputs($datei, $putnew);
}
else
{
$updatemake="doppelt"; // Installation is current
fputs($datei,$newzeile[$z]); 
}


}
else 
{ 
fputs($datei,$newzeile[$z]); 
}
}
}
fclose($datei);
//// Vogelgesang 28.12.2005 => Old Section for addon functality end here




if (($updatemake == "makenew") || ($updatemake=="doppelt")) {
include_once "$partwampp\install\\$updateinc";
}
}
// httpd.conf modification for Perl, Python or Java (only single)
////// PATH CHANGING SINCE APACHE 2.2 
/* if ($update == "perl") {
$includehttpdconf = "\r\n\r\nInclude conf/extra/perl.conf";
} */
if ($update == "python") {
$includehttpdconf = "\r\n\r\nInclude conf/extra/python.conf";
}
/* if ($update == "java") {
$includehttpdconf = "\r\n\r\nInclude conf/extra/java.conf";
} */
if ((($update == "perl") || ($update == "python") || ($update == "java")) && ($updatemake == "makenew")) {
$datei = fopen($confhttpdroot, 'a');
if ($datei) {
fputs($datei, $includehttpdconf);
}
@fclose($datei);
/* $datei = fopen($confhttpd2root, 'a');
if ($datei) {
fputs($datei, $includehttpdconf);
}
fclose($datei);
$datei = fopen($confhttpd3root, 'a');
if ($datei) {
fputs($datei, $includehttpdconf);
}
fclose($datei); */ //Vogelgesang 28.12.06 because obsolet
}


unlink($updatesysroot);
}
}
}


if (($xamppinstaller == "newinstall") || ($xamppinstaller == "newpath")) {
if ($xamppinstaller == "newinstall") {
/// First initialization only main packages
if (file_exists("$partwampp\install\\xamppbasic.inc")) {
include_once "$partwampp\install\\xamppbasic.inc";
}
if (file_exists("$partwampp\install\\xamppserver.inc")) { // Fix by Wiedmann
include_once "$partwampp\install\\xamppserver.inc";
}
} else {
/// Find all the packages
if (file_exists("$partwampp\install\\xamppbasic.inc")) {
include_once "$partwampp\install\\xamppbasic.inc";
}
if (file_exists("$partwampp\install\\xamppserver.inc")) {
include_once "$partwampp\install\\xamppserver.inc";
}
if (file_exists("$partwampp\install\\xamppperl.inc")) {
include_once "$partwampp\install\\xamppperl.inc";
}
if (file_exists("$partwampp\install\\xampppython.inc")) {
include_once "$partwampp\install\\xampppython.inc";
}
if (file_exists("$partwampp\install\\xampputils.inc")) {
include_once "$partwampp\install\\xampputils.inc";
}
if (file_exists("$partwampp\install\\xamppjava.inc")) {
include_once "$partwampp\install\\xamppjava.inc";
}
if (file_exists("$partwampp\install\\xamppother.inc")) {
include_once "$partwampp\install\\xamppother.inc";
}
$updatemake = "nothingtodo";
}
}


$scount = count($slashrootreal);
$bcount = count($backslashrootreal);


/////////////////// xampp path is changing ///////////////////
if ($xamppinstaller == "newpath") {
set_time_limit(0);
define('NEWSTDIN', fopen("php://stdin", "r")); // Fix by Wiedmann
while ($BS == "0") {
echo "\n  Do you want to refresh the XAMPP installation?\n";
echo "  Soll die XAMPP Installation jetzt aktualisiert werden?\n\n";
echo "  1) Refresh now! (Jetzt aktualisieren!)\n";
echo "  x) Exit (Beenden)\n";


switch (trim(fgets(NEWSTDIN, 256))) { // Fix by Wiedmann
case 1:
$BS = 1;
echo "\r\n  XAMPP is refreshing now ...\r\n";
echo "  XAMPP wird nun aktualisiert ...\r\n\r\n";
sleep(1);
break;


case "x":
echo "\r\n  The refresh is terminating on demand ...  exit\r\n";
echo "  Die Aktualisierung wurde auf Wunsch abgebrochen ...\r\n";
sleep(3);
exit;


default:
exit;
}
}
fclose(NEWSTDIN); // Fix by Wiedmann
}


/////////////////// You can configure the addon modules for httpd ///////////////////
if (file_exists($installsysroot)) {
$datei = fopen($installsysroot, 'r');
unset($newzeile);
$i = 0;
while (!feof($datei)) {
$zeile = fgets($datei, 255);
@list($left, $right) = preg_split ("/=/", $zeile);
$left = eregi_replace(" ", "", $left);
$left = eregi_replace("\r\n", "", $left);
$right = eregi_replace("\r\n", "", $right);
$right = eregi_replace("\.", "", $right);
if (strtolower($right) > 0) {
if (strtolower($left) == "perl") {
$perlactive = "yes";
}
if (strtolower($left) == "python") {
$pythonactive = "yes";
}
if (strtolower($left) == "java") {
$javaactive = "yes";
}
}
}
fclose($datei);
}


/////////////////// Case new install ///////////////////
if (($xamppinstaller == "newinstall") || ($BS == 1) || ($updatemake == "makenew") || ($updatemake == "doppelt")) {
if ($BS == "1") {
echo "  Refreshing all paths in config files ... \r\n\r\n";
}


echo "  Configure XAMPP with awk for ";
$system = system("echo '%os%'");
if ($system != "'Windows_NT'") {
$system = "Windows";
echo "  $system 98/ME/HOME";
}
echo "  Updating configuration files ... please wait ...";
if ($xamppinstaller == "newinstall") {
if ($system == "Windows") {
$confhttpdroot = $partwampp."\apache\\conf\\httpd.conf";
$includewin = "Win32DisableAcceptEx\r\n";
echo "\r\n  Disable AcceptEx Winsocks v2 support";
$datei = fopen($confhttpdroot, 'r');
unset($newzeile);
$i = 0;
while (!feof($datei)) {
$zeile = fgets($datei, 255);
$newzeile[] = $zeile;
$i++;
}
fclose($datei);
$datei = fopen($confhttpdroot, 'w');
if ($datei) {
for ($z = 0; $z < $i + 1; $z++) {
if (eregi("Win32DisableAcceptEx", $newzeile[$z])) {
fputs($datei, $includewin);
} else {
fputs($datei, $newzeile[$z]);
}
}
}
fclose($datei);
} else {
$confhttpdroot = $partwampp."\apache\\conf\\httpd.conf";
$includewin = "# Win32DisableAcceptEx\r\n";
// echo "\r\n  Enable AcceptEx Winsocks v2 support";
$datei = fopen($confhttpdroot, 'r');
$i = 0;
unset($newzeile);
while (!feof($datei)) {
$zeile = fgets($datei, 255);
$newzeile[] = $zeile;
$i++;
}
fclose($datei);
$datei = fopen($confhttpdroot, 'w');
if ($datei) {
for ($z = 0; $z < $i + 1; $z++) {
if (eregi("Win32DisableAcceptEx", $newzeile[$z])) {
fputs($datei, $includewin);
} else {
fputs($datei, $newzeile[$z]);
}
}
}
fclose($datei);
}
}


$substit = "\"".$substit."\"";
$trans = array(
"^" => "\\\\^",
"." => "\\\\.",
"[" => "\\\\[",
"$" => "\\\\$",
"(" => "\\\\(",
")" => "\\\\)",
"+" => "\\\\+",
"{" => "\\\\{"
);
$substit = strtr($substit, $trans);
for ($i = 0; $i <= $bcount; $i++) {
///// 08.08.05 Vogelgesang: For all files with identical file names /////
if ($backslash[$i] == "") {
$upbackslashrootreal = $backslashrootreal[$i];
} else {
$configname = $backslash[$i];
$upbackslashrootreal = $backslashrootreal[$configname].$configname;


}
$backslashawk = eregi_replace("\\\\", "\\\\", $upbackslashrootreal);
$backslashawk = "\"".$backslashawk;


$awkconfig = $backslashawk."\"";
$awkconfigtemp = $backslashawk."temp\"";
$configreal = $upbackslashrootreal;
$configtemp = $upbackslashrootreal."temp";


///////////// Section SET  NEW configfiles for addons/update OR DELETE /////////////
$configrealnew = $upbackslashrootreal.".new";
if (!file_exists($configreal) && file_exists($configrealnew)) {
if (!@copy($configrealnew, $configreal)) {
} else {
unlink($configrealnew);
}
} elseif (file_exists($configrealnew)) {
unlink($configrealnew);
}


if ($updatemake == "doppelt") {
break;
}
      // echo "DEBUG: Working with $awkconfig now ... \r\n";
$awkrealm = $awkexe." -v DIR=".$awknewdir." -v CONFIG=".$awkconfig. " -v CONFIGNEW=".$awkconfigtemp. "  -v SUBSTIT=".$substit." -f ".$awk;


if (file_exists($awk) && file_exists($awkexe) && file_exists($configreal)) {
$handle = popen($awkrealm, 'w'); // Fix by Wiedmann
pclose($handle);
}


if (file_exists($configtemp) && file_exists($configreal)) {
if (!@copy($configtemp, $configreal)) {
} else {
unlink($configtemp);
}
}
}


$substitslash = "\"".$substitslash."\"";
$trans = array(
"^" => "\\\\^",
"." => "\\\\.",
"[" => "\\\\[",
"$" => "\\\\$",
"(" => "\\\\(",
")" => "\\\\)",
"+" => "\\\\+",
"{" => "\\\\{"
);
$substitslash = strtr($substitslash, $trans);
for ($i = 0; $i <= $scount; $i++) {
///// 08.08.05 Vogelgesang: For all files with identical file names /////
if ($slash[$i] == "") {
$upslashrootreal = $slashrootreal[$i];
} else {
$configname = $slash[$i];
$upslashrootreal = $slashrootreal[$configname].$configname;
}
$slashawk = eregi_replace("\\\\", "\\\\", $upslashrootreal);
$slashawk = "\"".$slashawk;
$awkconfig = $slashawk."\"";
$awkconfigtemp = $slashawk."temp\"";
$configreal = $upslashrootreal;
$configtemp=$upslashrootreal."temp";


///////////// Section SET  NEW configfiles for addons/update OR DELETE /////////////
$configrealnew = $upslashrootreal.".new";
if (!file_exists($configreal) && file_exists($configrealnew)) {
if (!@copy($configrealnew, $configreal)) {
} else {
unlink($configrealnew);
}
} elseif (file_exists($configrealnew)) {
unlink($configrealnew);
}


if ($updatemake == "doppelt") {
break;
}
      // echo "DEBUG: Working with $awkconfig now ... \r\n";
$awkrealm = $awkexe." -v DIR=".$awkslashdir." -v CONFIG=".$awkconfig. " -v CONFIGNEW=".$awkconfigtemp. "  -v SUBSTIT=".$substitslash." -f ".$awk;


if (file_exists($awk) && file_exists($awkexe) && file_exists($configreal)) {
$handle = popen($awkrealm, 'w'); // Fix by Wiedmann
pclose($handle);
}


if (file_exists($configtemp) && file_exists($configreal)) {
if (!@copy($configtemp, $configreal)) {
} else {
unlink($configtemp);
}
}
}


if (($xamppinstaller == "newpath") || ($BS == 1)) {
if (file_exists($installsysroot)) {
$datei = fopen($installsysroot, 'r');
unset($newzeile);
$i = 0;
while (!feof($datei)) {
$zeile = fgets($datei, 255);
$newzeile[] = $zeile;
$i++;
}
fclose($datei);
}


$datei = fopen($installsysroot, 'w');
if ($datei) {
for ($z = 0; $z < $i + 1; $z++) {
if (eregi("DIR", $newzeile[$z])) {
$includenewdir = "DIR = $partwampp\r\n";
fputs($datei, $includenewdir);
} else {
$includenewdir = $newzeile[$z];
fputs($datei, $includenewdir);
}
}
}
fclose($datei);
}


////////// Replace (copy) some newer files ////////////////
$phpversion = trim(@file_get_contents($partwampp."\\install\\.phpversion")); //Fix by Wiedmann
switch ($phpversion) {
case 4:
$phpbin = $partwampp."\\apache\\bin\\php.ini";
$phpcgi = $partwampp."\\php\\php4\\php.ini";
@copy($phpbin, $phpcgi);
$phpbin = $partwampp."\\php\\php5.ini";
$phpcgi = $partwampp."\\php\\php.ini";
@copy($phpbin, $phpcgi);
break;


default:
$phpbin = $partwampp."\\apache\\bin\\php.ini";
$phpcgi = $partwampp."\\php\\php.ini";
@copy($phpbin, $phpcgi);
$phpbin = $partwampp."\\php\\php4\\php4.ini";
$phpcgi = $partwampp."\\php\\php4\\php.ini";
@copy($phpbin, $phpcgi);
break;
}


$workersbin = $partwampp."\\tomcat\\conf\\workers.properties";
$workersjk = $partwampp."\\tomcat\\conf\\jk\\workers.properties";
if (file_exists($workersbin)) {
copy($workersbin,$workersjk);
}


echo "  DONE!\r\n\r\n";
echo "\r\n  ##### Have fun with ApacheFriends XAMPP! #####\r\n\r\n\r\n";
sleep(1);
}


//////////////// Selection for modules  ////////////////
if ((($perlactive == "yes") || ($pythonactive == "yes") || ($javaactive == "yes")) && ($update == "")) {
$u = 1;


if ($perlactive == "yes") {
$moduleconf = "conf/extra/perl.conf";
$moduleconfigure = "MOD_PERL";
$u++;
}
if ($pythonactive == "yes") {
$moduleconf = "conf/extra/pyton.conf";
$moduleconfigure = "MOD_PYTHON";
$u++;
}
if ($javaactive == "yes") {
$moduleconf = "conf/extra/java.conf";
$moduleconfigure = "MOD_JDK";
$u++;
}


set_time_limit(0);
define('NEWSTDIN', fopen("php://stdin", "r"));
while ($CS == "0") {
echo "\n  Please select your choice!\n";
echo "  Bitte jetzt auswaehlen!\n\n";
if ($perlactive == "yes") {
echo "  1) Configuration with MOD_PERL (mit MOD_PERL)\n";
echo "  2) Configuration without MOD_PERL (ohne MOD MOD_PERL)\n";
}
if ($pythonactive == "yes") {
echo "  3) Configuration with MOD_PYTHON (mit MOD_PYTHON)\n";
echo "  4) Configuration without MOD_PYTHON (ohne MOD_PYTHON)\n";
}
if ($javaactive == "yes") {
echo "  5) Configuration with MOD_JDK (mit MOD_JDK)\n";
echo "  6) Configuration without MOD_JDK (ohne MOD_JDK)\n";
}
echo "  x) Exit (Beenden)\n";


switch (trim(fgets(NEWSTDIN, 256))) {
case 1:
$CS = 1;
echo "\r\n  Starting configure XAMPP with MOD_PERL ...\r\n";
sleep(1);
break;


case 2:
$CS = 2;
echo "\r\n  Starting configure XAMPP without MOD_PERL ...\r\n";
sleep(1);
break;


case 3:
$CS = 3;
echo "\r\n  Starting configure XAMPP with MOD_PYTHON ...\r\n";
sleep(1);
break;


case 4:
$CS = 4;
echo "\r\n  Starting configure XAMPP without MOD_PYTHON ...\r\n";
sleep(1);
break;


case 5:
$CS = 5;
echo "\r\n  Starting configure XAMPP with MOD_JDK ...\r\n";
sleep(1);
break;


case 6:
$CS = 6;
echo "\r\n  Starting configure XAMPP without MOD_JDK ...\r\n";
sleep(1);
break;


case "x":
echo "\r\n  Setup is terminating on demand ...  exit\r\n";
echo "  Das Setup wurde auf Wunsch abgebrochen ...\r\n";
sleep(3);
exit;


default:
exit;
}
}
fclose(NEWSTDIN);


if ($CS == 1) {
$include = "Include conf/extra/perl.conf"; $searchstring="conf/extra/perl.conf";
}
if ($CS == 2) {
$include = "# Include conf/extra/perl.conf"; $searchstring="conf/extra/perl.conf";
}
if ($CS == 3) {
$include = "Include conf/extra/python.conf"; $searchstring="conf/extra/python.conf";
}
if ($CS == 4) {
$include = "# Include conf/extra/python.conf"; $searchstring="conf/extra/python.conf";
}
if ($CS == 5) {
$include = "Include conf/extra/java.conf"; $searchstring="conf/extra/java.conf";
}
if ($CS == 6) {
$include = "# Include conf/extra/java.conf"; $searchstring="conf/extra/java.conf";
}


if ($CS > 0) {
$i = 0;
$datei = fopen($confhttpdroot, 'r');
while (!feof($datei)) {
$zeile = fgets($datei, 255);
$newzeile[] = $zeile;
$i++;
}
fclose($datei);
$datei = fopen($confhttpdroot, 'w');
if ($datei) {
for ($z = 0; $z < $i + 1; $z++) {
if (eregi($searchstring, $newzeile[$z])) {
fputs($datei, $include);
} else {
fputs($datei, $newzeile[$z]);
}
}
}
fclose($datei);
unset($newzeile);


/// Vogelgesang 28.12.06 because obsolet since 1.51
/* $i = 0;
$datei = fopen($confhttpd2root, 'r');
while (!feof($datei)) {
$zeile = fgets($datei, 255);
$newzeile[] = $zeile;
$i++;
}
fclose($datei);
$datei = fopen($confhttpd2root, 'w');
if ($datei) {
for($z = 0; $z < $i + 1; $z++) {
if (eregi($searchstring, $newzeile[$z])) {
fputs($datei, $include);
} else {
fputs($datei, $newzeile[$z]);
}
}
}
fclose($datei);
unset($newzeile);
$i = 0;
$datei = fopen($confhttpd3root, 'r');
while (!feof($datei)) {
$zeile = fgets($datei, 255);
$newzeile[] = $zeile;
$i++;
}
fclose($datei);
$datei = fopen($confhttpd3root, 'w');
if ($datei) {
for ($z = 0; $z < $i + 1; $z++) {
if (eregi($searchstring, $newzeile[$z])) {
fputs($datei, $include);
} else {
fputs($datei, $newzeile[$z]);
}
}
}
fclose($datei);
unset($newzeile);*/ 
echo "  Done!\r\n\r\n";
}
}


if (file_exists($partwampp.'\install\serverupdate.inc')) { // Fix by Wiedmann
include $partwampp.'\install\serverupdate.inc';
unlink($partwampp.'\install\serverupdate.inc');
echo "\r\n".'Ready.'."\r\n";
}


if ($updatemake == "") {
$updatemake="nothingtodo";
}


if (($updatemake == "nothingtodo") && ($xamppinstaller == "nothingtodo") && (($CS < 1) || ($CS == ""))) {
echo "\r\n\r\n Sorry, but ... nothing to do!\r\n\r\n\r\n";
}


exit;
?>

Link para o post
Compartilhar em outros sites

veja se é esse

<?PHP
define('INITIALIZED', true);
define('ONLY_PAGE', false);
if(!file_exists('install.txt'))
{
echo('AAC installation is disabled. To enable it make file <b>install.php</b> in main AAC directory and put there your IP.');
exit;
}
$installIP = trim(file_get_contents('install.txt'));
if($installIP != $_SERVER['REMOTE_ADDR'])
{
echo('In file <b>install.txt</b> must be your IP!<br />In file is:<br /><b>' . $installIP . '</b><br />Your IP is:<br /><b>' . $_SERVER['REMOTE_ADDR'] . '</b>');
exit;
}


$time_start = microtime(true);
session_start();


function autoLoadClass($className)
{
if(!class_exists($className))
if(file_exists('./classes/' . strtolower($className) . '.php'))
include_once('./classes/' . strtolower($className) . '.php');
else
new Error_Critic('#E-7', 'Cannot load class <b>' . $className . '</b>, file <b>./classes/class.' . strtolower($className) . '.php</b> doesn\'t exist');
}
spl_autoload_register('autoLoadClass');


//load acc. maker config to $config['site']
$config = array();
include('./config/config.php');
if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())
{
    $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
    while(list($key, $val) = each($process))
{
        foreach ($val as $k => $v)
{
            unset($process[$key][$k]);
            if(is_array($v))
{
                $process[$key][stripslashes($k)] = $v;
                $process[] = &$process[$key][stripslashes($k)];
            }
else
                $process[$key][stripslashes($k)] = stripslashes($v);
        }
    }
    unset($process);
}






$page = '';
if(isset($_REQUEST['page']))
$page = $_REQUEST['page'];
$step = 'start';
if(isset($_REQUEST['step']))
$step = $_REQUEST['step'];
// load server path
function getServerPath()
{
$config = array();
include('./config/config.php');
return $config['site']['serverPath'];
}
// save server path
function setServerPath($newPath)
{
$file = fopen("./config/config.php", "r");
$lines = array();
while (!feof($file)) {
$lines[] = fgets($file);
}
fclose($file);


$newConfig = array();
foreach ($lines as $i => $line)
{
if(substr($line, 0, strlen('$config[\'site\'][\'serverPath\']')) == '$config[\'site\'][\'serverPath\']')
$newConfig[] = '$config[\'site\'][\'serverPath\'] = "' . str_replace('"', '\"' , $newPath) . '";' . PHP_EOL; // do something with each line from text file here
else
$newConfig[] = $line;
}
Website::putFileContents("./config/config.php", implode('', $newConfig));
}
if($page == '')
{
echo '<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<title>Installation of account maker</title>
</head>
<frameset cols="230,*">
<frame name="menu" src="install.php?page=menu" />
<frame name="step" src="install.php?page=step&step=start" />
<noframes><body>Frames don\'t work. Install Firefox </body></noframes>
</frameset>
</html>';
}
elseif($page == 'menu')
{
echo '<h2>MENU</h2><br>
<b>IF NOT INSTALLED:</b><br>
<a href="install.php?page=step&step=start" target="step">0. Informations</a><br>
<a href="install.php?page=step&step=1" target="step">1. Set server path</a><br>
<a href="install.php?page=step&step=2" target="step">2. Check DataBase connection</a><br>
<a href="install.php?page=step&step=3" target="step">3. Add tables and columns to DB</a><br>
<a href="install.php?page=step&step=4" target="step">4. Add samples to DB</a><br>
<a href="install.php?page=step&step=5" target="step">5. Set Admin Account</a><br>
<b>Author:</b><br>
Gesior<br>
Compatible with TFS 0.3.6 and TFS 0.4 up to revision 3702</a>';
}
elseif($page == 'step')
{
if($step >= 2 && $step <= 5)
{
//load server config $config['server']
if(Website::getWebsiteConfig()->getValue('useServerConfigCache'))
{
// use cache to make website load faster
if(Website::fileExists('./config/server.config.php'))
{
$tmp_php_config = new ConfigPHP('./config/server.config.php');
$config['server'] = $tmp_php_config->getConfig();
}
else
{
// if file isn't cache we should load .lua file and make .php cache
$tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua');
$config['server'] = $tmp_lua_config->getConfig();
$tmp_php_config = new ConfigPHP();
$tmp_php_config->setConfig($tmp_lua_config->getConfig());
$tmp_php_config->saveToFile('./config/server.config.php');
}
}
else
{
$tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua');
$config['server'] = $tmp_lua_config->getConfig();
}
if(Website::getServerConfig()->isSetKey('mysqlHost'))
{
define('SERVERCONFIG_SQL_TYPE', 'sqlType');
define('SERVERCONFIG_SQL_HOST', 'mysqlHost');
define('SERVERCONFIG_SQL_PORT', 'mysqlPort');
define('SERVERCONFIG_SQL_USER', 'mysqlUser');
define('SERVERCONFIG_SQL_PASS', 'mysqlPass');
define('SERVERCONFIG_SQL_DATABASE', 'mysqlDatabase');
define('SERVERCONFIG_SQLITE_FILE', 'sqlFile');
}
elseif(Website::getServerConfig()->isSetKey('sqlHost'))
{
define('SERVERCONFIG_SQL_TYPE', 'sqlType');
define('SERVERCONFIG_SQL_HOST', 'sqlHost');
define('SERVERCONFIG_SQL_PORT', 'sqlPort');
define('SERVERCONFIG_SQL_USER', 'sqlUser');
define('SERVERCONFIG_SQL_PASS', 'sqlPass');
define('SERVERCONFIG_SQL_DATABASE', 'sqlDatabase');
define('SERVERCONFIG_SQLITE_FILE', 'sqlFile');
}
else
new Error_Critic('#E-3', 'There is no key <b>sqlHost</b> or <b>mysqlHost</b> in server config', array(new Error('INFO', 'use server config cache: <b>' . (Website::getWebsiteConfig()->getValue('useServerConfigCache') ? 'true' : 'false') . '</b>')));
if(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_TYPE) == 'mysql')
{
Website::setDatabaseDriver(Database::DB_MYSQL);
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_HOST))
Website::getDBHandle()->setDatabaseHost(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_HOST));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_HOST . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PORT))
Website::getDBHandle()->setDatabasePort(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PORT));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PORT . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_DATABASE))
Website::getDBHandle()->setDatabaseName(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_DATABASE));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_DATABASE . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_USER))
Website::getDBHandle()->setDatabaseUsername(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_USER));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_USER . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PASS))
Website::getDBHandle()->setDatabasePassword(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PASS));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PASS . '</b> in server config file.');
}
elseif(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_TYPE) == 'sqlite')
{
Website::setDatabaseDriver(Database::DB_SQLITE);
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQLITE_FILE))
Website::getDBHandle()->setDatabaseFile(Website::getServerConfig()->getValue(SERVERCONFIG_SQLITE_FILE));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQLITE_FILE . '</b> in server config file.');
}
elseif(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_TYPE) == 'pgsql')
{
// does pgsql use 'port' parameter? I don't know
Website::setDatabaseDriver(Database::DB_PGSQL);
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_HOST))
Website::getDBHandle()->setDatabaseHost(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_HOST));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_HOST . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_DATABASE))
Website::getDBHandle()->setDatabaseName(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_DATABASE));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_DATABASE . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_USER))
Website::getDBHandle()->setDatabaseUsername(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_USER));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_USER . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PASS))
Website::getDBHandle()->setDatabasePassword(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PASS));
else
new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PASS . '</b> in server config file.');
}
else
new Error_Critic('#E-6', 'Database error. Unknown database type in <b>server config</b> . Must be equal to: "<b>mysql</b>", "<b>sqlite</b>" or "<b>pgsql</b>" . Now is: "<b>' . Website::getServerConfig()->getValue(SERVERCONFIG_SQL_TYPE) . '</b>"');
Website::setPasswordsEncryption(Website::getServerConfig()->getValue('encryptionType'));
$SQL = Website::getDBHandle();
}


if($step == 'start')
{
echo '<h1>STEP '.$step.'</h1>Informations<br>';
echo 'Welcome to Gesior Account Maker installer. <b>After 5 simple steps account maker will be ready to use!</b><br />';
// check access to write files
$writeable = array('config/config.php', 'cache', 'cache/flags', 'cache/DONT_EDIT_usercounter.txt', 'cache/DONT_EDIT_serverstatus.txt', 'custom_scripts', 'install.txt');
foreach($writeable as $fileToWrite)
{
if(is_writable($fileToWrite))
echo '<span style="color:green">CAN WRITE TO FILE: <b>' . $fileToWrite . '</b></span><br />';
else
echo '<span style="color:red">CANNOT WRITE TO FILE: <b>' . $fileToWrite . '</b> - edit file access for PHP [on linux: chmod]</span><br />';
}
}
elseif($step == 1)
{
if(isset($_REQUEST['server_path']))
{
echo '<h1>STEP '.$step.'</h1>Check server configuration<br>';
$path = $_REQUEST['server_path'];
$path = trim($path)."\\";
$path = str_replace("\\\\", "/", $path);
$path = str_replace("\\", "/", $path);
$path = str_replace("//", "/", $path);
setServerPath($path);
$tmp_lua_config = new ConfigLUA($path . 'config.lua');
$config['server'] = $tmp_lua_config->getConfig();
if(isset($config['server']['sqlType']))
{
echo 'File <b>config.lua</b> loaded from <font color="red"><i>'.$path.'config.lua</i></font>. It looks like fine server config file. Now you can check database('.$config['server']['sqlType'].') connection: <a href="install.php?page=step&step=2">STEP 2 - check database connection</a>';
}
else
{
echo 'File <b>config.lua</b> loaded from <font color="red"><i>'.$path.'config.lua</i></font> and it\'s not valid TFS config.lua file. <a href="install.php?page=step&step=1">Go to STEP 1 - select other directory.</a> If it\'s your config.lua file from TFS contact with acc. maker author.';
}
}
else
{
echo 'Please write you TFS directory below. Like: <i>C:\Documents and Settings\Gesior\Desktop\TFS 0.2.9\</i><form action="install.php">
<input type="text" name="server_path" size="90" value="'.htmlspecialchars(getServerPath()).'" /><input type="hidden" name="page" value="step" /><input type="hidden" name="step" value="1" /><input type="submit" value="Set server path" />
</form>';
}
}
elseif($step == 2)
{
echo '<h1>STEP '.$step.'</h1>Check database connection<br>';
echo 'If you don\'t see any errors press <a href="install.php?page=step&step=3">link to STEP 3 - Add tables and columns to DB</a>. If you see some errors it mean server has wrong configuration. Check FAQ or ask author of acc. maker.<br />';
$SQL->connect(); // show errors if can't connect
}
elseif($step == 3)
{
echo '<h1>STEP '.$step.'</h1>Add tables and columns to DB<br>';
echo 'Installer try to add new tables and columns to database.<br>';
$columns = array();
//$columns[] = array('table', 'name_of_column', 'type', 'length', 'default');
$columns[] = array('accounts', 'key', 'VARCHAR', '20', '0');
$columns[] = array('accounts', 'email_new', 'VARCHAR', '255', '');
$columns[] = array('accounts', 'email_new_time', 'INT', '11', '0');
$columns[] = array('accounts', 'rlname', 'VARCHAR', '255', '');
$columns[] = array('accounts', 'location', 'VARCHAR', '255', '');
$columns[] = array('accounts', 'page_access', 'INT', '11', '0');
$columns[] = array('accounts', 'email_code', 'VARCHAR', '255', '');
$columns[] = array('accounts', 'next_email', 'INT', '11', '0');
$columns[] = array('accounts', 'premium_points', 'INT', '11', '0');
$columns[] = array('accounts', 'create_date', 'INT', '11', '0');
$columns[] = array('accounts', 'create_ip', 'INT', '11', '0');
$columns[] = array('accounts', 'last_post', 'INT', '11', '0');
$columns[] = array('accounts', 'flag', 'VARCHAR', '80', '');
$columns[] = array('accounts', 'guild_points', 'INT', '11', '0');
$columns[] = array('accounts', 'vip_time', 'INT', '15', '0');


$columns[] = array('guilds', 'description', 'TEXT', '', '');
$columns[] = array('guilds', 'guild_logo', 'MEDIUMBLOB', '', NULL);
$columns[] = array('guilds', 'create_ip', 'INT', '11', '0');
$columns[] = array('guilds', 'balance', 'BIGINT UNSIGNED', '', '0');
$columns[] = array('killers', 'war', 'INT', '11', '0');


$columns[] = array('players', 'deleted', 'TINYINT', '1', '0');
$columns[] = array('players', 'description', 'VARCHAR', '255', '');
$columns[] = array('players', 'comment', 'TEXT', '', '');
$columns[] = array('players', 'create_ip', 'INT', '11', '0');
$columns[] = array('players', 'create_date', 'INT', '11', '0');
$columns[] = array('players', 'hide_char', 'INT', '11', '0');
$columns[] = array('players', 'signature', 'TEXT', '', '');


$tables = array();
// mysql tables
$tables[Database::DB_MYSQL]['z_ots_comunication'] = "CREATE TABLE `z_ots_comunication` (
 `id` int(11) NOT NULL auto_increment,
 `name` varchar(255) NOT NULL,
 `type` varchar(255) NOT NULL,
 `action` varchar(255) NOT NULL,
 `param1` varchar(255) NOT NULL,
 `param2` varchar(255) NOT NULL,
 `param3` varchar(255) NOT NULL,
 `param4` varchar(255) NOT NULL,
 `param5` varchar(255) NOT NULL,
 `param6` varchar(255) NOT NULL,
 `param7` varchar(255) NOT NULL,
 `delete_it` int(2) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_ots_guildcomunication'] = "CREATE TABLE `z_ots_guildcomunication` (
 `id` int(11) NOT NULL auto_increment,
 `name` varchar(255) NOT NULL,
 `type` varchar(255) NOT NULL,
 `action` varchar(255) NOT NULL,
 `param1` varchar(255) NOT NULL,
 `param2` varchar(255) NOT NULL,
 `param3` varchar(255) NOT NULL,
 `param4` varchar(255) NOT NULL,
 `param5` varchar(255) NOT NULL,
 `param6` varchar(255) NOT NULL,
 `param7` varchar(255) NOT NULL,
 `delete_it` int(2) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_polls'] = "CREATE TABLE `z_polls` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
     `question` varchar(255) NOT NULL,
                              `end` int(11) NOT NULL,
     `start` int(11) NOT NULL,
     `answers` int(11) NOT NULL,
     `votes_all` int(11) NOT NULL,
      PRIMARY KEY (`id`)
  ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;";
$tables[Database::DB_MYSQL]['accounts'] = "ALTER TABLE `accounts` ADD `vote` INT( 11 ) NOT NULL ;";
$tables[Database::DB_MYSQL]['z_polls_answers'] = "CREATE TABLE `z_polls_answers` (
 `poll_id` int(11) NOT NULL,
 `answer_id` int(11) NOT NULL,
 `answer` varchar(255) NOT NULL,
 `votes` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_network_box'] = "CREATE TABLE `z_network_box` (
`id` int(11) NOT NULL AUTO_INCREMENT,
   `network_name` varchar(10) NOT NULL,
   `network_link` varchar(50) NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;";
$tables[Database::DB_MYSQL]['z_shop_offer'] = "CREATE TABLE `z_shop_offer` (
 `id` int(11) NOT NULL auto_increment,
 `points` int(11) NOT NULL default '0',
 `itemid1` int(11) NOT NULL default '0',
 `count1` int(11) NOT NULL default '0',
 `itemid2` int(11) NOT NULL default '0',
 `count2` int(11) NOT NULL default '0',
 `offer_type` varchar(255) default NULL,
 `offer_description` text NOT NULL,
 `offer_name` varchar(255) NOT NULL,
 PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_shop_history_pacc'] = "CREATE TABLE `z_shop_history_pacc` (
 `id` int(11) NOT NULL auto_increment,
 `to_name` varchar(255) NOT NULL default '0',
 `to_account` int(11) NOT NULL default '0',
 `from_nick` varchar(255) NOT NULL,
 `from_account` int(11) NOT NULL default '0',
 `price` int(11) NOT NULL default '0',
 `pacc_days` int(11) NOT NULL default '0',
 `trans_state` varchar(255) NOT NULL,
 `trans_start` int(11) NOT NULL default '0',
 `trans_real` int(11) NOT NULL default '0',
 PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_shop_history_item'] = "CREATE TABLE `z_shop_history_item` (
 `id` int(11) NOT NULL auto_increment,
 `to_name` varchar(255) NOT NULL default '0',
 `to_account` int(11) NOT NULL default '0',
 `from_nick` varchar(255) NOT NULL,
 `from_account` int(11) NOT NULL default '0',
 `price` int(11) NOT NULL default '0',
 `offer_id` varchar(255) NOT NULL default '',
 `trans_state` varchar(255) NOT NULL,
 `trans_start` int(11) NOT NULL default '0',
 `trans_real` int(11) NOT NULL default '0',
 PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_shopguild_offer'] = "CREATE TABLE `z_shopguild_offer` (
 `id` int(11) NOT NULL auto_increment,
 `points` int(11) NOT NULL default '0',
 `itemid1` int(11) NOT NULL default '0',
 `count1` int(11) NOT NULL default '0',
 `itemid2` int(11) NOT NULL default '0',
 `count2` int(11) NOT NULL default '0',
 `offer_type` varchar(255) default NULL,
 `offer_description` text NOT NULL,
 `offer_name` varchar(255) NOT NULL,
 PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_shopguild_history_pacc'] = "CREATE TABLE `z_shopguild_history_pacc` (
 `id` int(11) NOT NULL auto_increment,
 `to_name` varchar(255) NOT NULL default '0',
 `to_account` int(11) NOT NULL default '0',
 `from_nick` varchar(255) NOT NULL,
 `from_account` int(11) NOT NULL default '0',
 `price` int(11) NOT NULL default '0',
 `pacc_days` int(11) NOT NULL default '0',
 `trans_state` varchar(255) NOT NULL,
 `trans_start` int(11) NOT NULL default '0',
 `trans_real` int(11) NOT NULL default '0',
 PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_shop_historyguild_item'] = "CREATE TABLE `z_shopguild_history_item` (
 `id` int(11) NOT NULL auto_increment,
 `to_name` varchar(255) NOT NULL default '0',
 `to_account` int(11) NOT NULL default '0',
 `from_nick` varchar(255) NOT NULL,
 `from_account` int(11) NOT NULL default '0',
 `price` int(11) NOT NULL default '0',
 `offer_id` varchar(255) NOT NULL default '',
 `trans_state` varchar(255) NOT NULL,
 `trans_start` int(11) NOT NULL default '0',
 `trans_real` int(11) NOT NULL default '0',
 PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_featured_article'] = "CREATE TABLE `z_featured_article` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `title` varchar(50) NOT NULL,
 `text` varchar(255) NOT NULL,
 `date` varchar(30) NOT NULL,
     `author` varchar(50) NOT NULL,
 `read_more` varchar(100) NOT NULL,
 PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;";
$tables[Database::DB_MYSQL]['z_forum'] = "CREATE TABLE `z_forum` (
 `id` int(11) NOT NULL auto_increment,
 `first_post` int(11) NOT NULL default '0',
 `last_post` int(11) NOT NULL default '0',
 `section` int(3) NOT NULL default '0',
 `replies` int(20) NOT NULL default '0',
 `views` int(20) NOT NULL default '0',
 `author_aid` int(20) NOT NULL default '0',
 `author_guid` int(20) NOT NULL default '0',
 `post_text` text NOT NULL,
 `post_topic` varchar(255) NOT NULL,
 `post_smile` tinyint(1) NOT NULL default '0',
 `post_date` int(20) NOT NULL default '0',
 `last_edit_aid` int(20) NOT NULL default '0',
 `edit_date` int(20) NOT NULL default '0',
 `post_ip` varchar(15) NOT NULL default '0.0.0.0',
 `icon_id` tinyint(4) NOT NULL DEFAULT '1',
 `post_icon_id` tinyint(10) NOT NULL,
 PRIMARY KEY  (`id`),
 KEY `section` (`section`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['z_news_tickers'] = "CREATE TABLE `z_news_tickers` (
`date` int(11) NOT NULL DEFAULT '1',
         `author` int(11) NOT NULL,
    `image_id` int(3) NOT NULL DEFAULT '0',
                             `text` text NOT NULL,
                             `hide_ticker` tinyint(1) NOT NULL
                           ) ENGINE=MyISAM DEFAULT CHARSET=latin1;";
$tables[Database::DB_MYSQL]['guild_wars'] = "CREATE TABLE `guild_wars` (
 `id` INT NOT NULL AUTO_INCREMENT,
 `guild_id` INT NOT NULL,
 `enemy_id` INT NOT NULL,
 `begin` BIGINT NOT NULL DEFAULT '0',
 `end` BIGINT NOT NULL DEFAULT '0',
 `frags` INT UNSIGNED NOT NULL DEFAULT '0',
 `payment` BIGINT UNSIGNED NOT NULL DEFAULT '0',
 `guild_kills` INT UNSIGNED NOT NULL DEFAULT '0',
 `enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0',
 `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 KEY `status` (`status`),
 KEY `guild_id` (`guild_id`),
 KEY `enemy_id` (`enemy_id`)
) ENGINE=InnoDB;";
$tables[Database::DB_MYSQL]['guild_wars_table_references'] = "ALTER TABLE `guild_wars`
 ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,
 ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;";
$tables[Database::DB_MYSQL]['guild_kills'] = "CREATE TABLE `guild_kills` (
 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 `guild_id` INT NOT NULL,
 `war_id` INT NOT NULL,
 `death_id` INT NOT NULL
) ENGINE = InnoDB;";
$tables[Database::DB_MYSQL]['guild_kills_table_references'] = "ALTER TABLE `guild_kills`
 ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE,
 ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE,
 ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;";
// sqlite tables
$tables[Database::DB_SQLITE]['z_ots_comunication'] = 'CREATE TABLE "z_ots_comunication" (
 "id" INTEGER PRIMARY KEY AUTOINCREMENT,
 "name" varchar(255) NOT NULL,
 "type" varchar(255) NOT NULL,
 "action" varchar(255) NOT NULL,
 "param1" varchar(255) NOT NULL,
 "param2" varchar(255) NOT NULL,
 "param3" varchar(255) NOT NULL,
 "param4" varchar(255) NOT NULL,
 "param5" varchar(255) NOT NULL,
 "param6" varchar(255) NOT NULL,
 "param7" varchar(255) NOT NULL,
 "delete_it" int(2) NOT NULL default 1);';
$tables[Database::DB_SQLITE]['z_shop_offer'] = 'CREATE TABLE "z_shop_offer" (
 "id" INTEGER PRIMARY KEY AUTOINCREMENT,
 "points" int(11) NOT NULL default 0,
 "itemid1" int(11) NOT NULL default 0,
 "count1" int(11) NOT NULL default 0,
 "itemid2" int(11) NOT NULL default 0,
 "count2" int(11) NOT NULL default 0,
 "offer_type" varchar(255) default NULL,
 "offer_description" text NOT NULL,
 "offer_name" varchar(255) NOT NULL);';
$tables[Database::DB_SQLITE]['z_shop_history_item'] = 'CREATE TABLE "z_shop_history_item" (
 "id" INTEGER PRIMARY KEY AUTOINCREMENT,
 "to_name" varchar(255) NOT NULL default 0,
 "to_account" int(11) NOT NULL default 0,
 "from_nick" varchar(255) NOT NULL,
 "from_account" int(11) NOT NULL default 0,
 "price" int(11) NOT NULL default 0,
 "offer_id" varchar(255) NOT NULL default "",
 "trans_state" varchar(255) NOT NULL,
 "trans_start" int(11) NOT NULL default 0,
 "trans_real" int(11) NOT NULL default 0);';
$tables[Database::DB_SQLITE]['z_forum'] = 'CREATE TABLE "z_forum" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"first_post" int(11) NOT NULL default 0,
"last_post" int(11) NOT NULL default 0,
"section" int(3) NOT NULL default 0,
"replies" int(20) NOT NULL default 0,
"views" int(20) NOT NULL default 0,
"author_aid" int(20) NOT NULL default 0,
"author_guid" int(20) NOT NULL default 0,
"post_text" text NOT NULL,
"post_topic" varchar(255) NOT NULL,
"post_smile" tinyint(1) NOT NULL default 0,
"post_date" int(20) NOT NULL default 0,
"last_edit_aid" int(20) NOT NULL default 0,
"edit_date" int(20) NOT NULL default 0,
"post_ip" varchar(15) NOT NULL default "0.0.0.0,");';
foreach($columns as $column)
{
if($column[4] === NULL && $SQL->query('ALTER TABLE ' . $SQL->tableName($column[0]) . ' ADD ' . $SQL->fieldName($column[1]) . ' ' . $column[2] . '  NULL DEFAULT NULL') !== false)
echo "<span style=\"color:green\">Column <b>" . $column[1] . "</b> added to table <b>" . $column[0] . "</b>.</span><br />";
elseif($SQL->query('ALTER TABLE ' . $SQL->tableName($column[0]) . ' ADD ' . $SQL->fieldName($column[1]) . ' ' . $column[2] . '' . (($column[3] == '') ? '' : '(' . $column[3] . ')') . ' NOT NULL DEFAULT \'' . $column[4] . '\'') !== false)
echo "<span style=\"color:green\">Column <b>" . $column[1] . "</b> added to table <b>" . $column[0] . "</b>.</span><br />";
else
echo "Could not add column <b>" . $column[1] . "</b> to table <b>" . $column[0] . "</b>. Already exist?<br />";
}
foreach($tables[$SQL->getDatabaseDriver()] as $tableName => $tableQuery)
{
if($SQL->query($tableQuery) !== false)
echo "<span style=\"color:green\">Table <b>" . $tableName . "</b> created.</span><br />";
else
echo "Could not create table <b>" . $tableName . "</b>. Already exist?<br />";
}
echo 'Tables and columns added to database.<br>Go to <a href="install.php?page=step&step=4">STEP 4 - Add samples</a>';
}
elseif($step == 4)
{
echo '<h1>STEP '.$step.'</h1>Add samples to DB:<br>';


$samplePlayers = array();
$samplePlayers[0] = 'Rook Sample';
$samplePlayers[1] = 'Sorcerer Sample';
$samplePlayers[2] = 'Druid Sample';
$samplePlayers[3] = 'Paladin Sample';
$samplePlayers[4] = 'Knight Sample';
$newPlayer = new Player('Account Manager', Player::LOADTYPE_NAME);
if($newPlayer->isLoaded())
{
foreach($samplePlayers as $vocationID => $name)
{
$samplePlayer = new Player($name, Player::LOADTYPE_NAME);
if(!$samplePlayer->isLoaded())
{
$samplePlayer = new Player('Account Manager', Player::LOADTYPE_NAME);
$samplePlayer->setID(null); // save as new player, not edited
$samplePlayer->setName($name);
$samplePlayer->setVocation($vocationID);
$samplePlayer->setGroupID(1);
$samplePlayer->setLookType(128);
$samplePlayer->save();
echo '<span style="color:green">Added sample character: </span><span style="color:green;font-weight:bold">' . $name . '</span><br/>';
}
else
echo 'Sample character: <span style="font-weight:bold">' . $name . '</span> already exist in database<br/>';
}
}
else
new Error_Critic('', 'Character <i>Account Manager</i> does not exist. Cannot install sample characters!');
}
elseif($step == 5)
{
echo '<h1>STEP '.$step.'</h1>Set Admin Account<br>';
if(empty($_REQUEST['saveaccpassword']))
{
echo 'Admin account login is: <b>1</b><br/>Set new password to this account.<br>';
echo 'New password: <form action="install.php" method=POST><input type="text" name="newpass" size="35">(Don\'t give it password to anyone!)';
echo '<input type="hidden" name="saveaccpassword" value="yes"><input type="hidden" name="page" value="step"><input type="hidden" name="step" value="5"><input type="submit" value="SET"></form><br>If account with login 1 doesn\'t exist installator will create it and set your password.';
}
else
{
include_once('./system/load.compat.php');
$newpass = trim($_POST['newpass']);
if(!check_password($newpass))
echo 'Password contains illegal characters. Please use only a-Z and 0-9. <a href="install.php?page=step&step=5">GO BACK</a> and write other password.';
else
{
//create / set pass to admin account
$account = new Account(1, Account::LOADTYPE_NAME);
if($account->isLoaded())
{
$account->setPassword($newpass); // setPassword encrypt it to ots encryption
$account->setPageAccess(3);
$account->setFlag('unknown');
$account->save();
}
else
{
$newAccount = new Account();
$newAccount->setName(1);
$newAccount->setPassword($newpass); // setPassword encrypt it to ots encryption
$newAccount->setMail(rand(0,999999) . '@gmail.com');
$newAccount->setPageAccess(3);
$newAccount->setGroupID(1);
$newAccount->setFlag('unknown');
$newAccount->setCreateIP(Visitor::getIP());
$newAccount->setCreateDate(time());
}
$_SESSION['account'] = 1;
$_SESSION['password'] = $newpass;
$logged = TRUE;
echo '<h1>Admin account login: 1<br>Admin account password: '.$newpass.'</h1><br/><h3>It\'s end of installation. Installation is blocked!</h3>'; 
if(!unlink('install.txt'))
new Error_Critic('', 'Cannot remove file <i>install.txt</i>. You must remove it to disable installer. I recommend you to go to step <i>0</i> and check if any other file got problems with WRITE permission.');
}
}
}
}

Link para o post
Compartilhar em outros sites

remove essa parte do código .. 
 

if($installIP != $_SERVER['REMOTE_ADDR'])
{
echo('In file <b>install.txt</b> must be your IP!<br />In file is:<br /><b>' . $installIP . '</b><br />Your IP is:<br /><b>' . $_SERVER['REMOTE_ADDR'] . '</b>');
exit;
}
Link para o post
Compartilhar em outros sites

 

remove essa parte do código .. 

 

if($installIP != $_SERVER['REMOTE_ADDR'])
{
echo('In file <b>install.txt</b> must be your IP!<br />In file is:<br /><b>' . $installIP . '</b><br />Your IP is:<br /><b>' . $_SERVER['REMOTE_ADDR'] . '</b>');
exit;
}

 

Cara tirando essas linhas não vai ter IP do Administrador, é melhor deixar!

Atenciosamente, Anuudek.

                                                               banner.gif

Link para o post
Compartilhar em outros sites
  • 1 year later...
Em 25/11/2014 at 16:28, luanluciano93 disse:

remove essa parte do código .. 
 


if($installIP != $_SERVER['REMOTE_ADDR'])
{
echo('In file <b>install.txt</b> must be your IP!<br />In file is:<br /><b>' . $installIP . '</b><br />Your IP is:<br /><b>' . $_SERVER['REMOTE_ADDR'] . '</b>');
exit;
}

vlw man ajudou pks

Link para o post
Compartilhar em outros sites
  • 3 weeks later...

pra mim ta aparecendo isso agora!

 


Check server configuration
File config.lua loaded from I:/Meu OT/Global 7.6/config.lua and it's not valid TFS config.lua file. Go to STEP 1 - select other directory. If it's your config.lua file from TFS contact with acc. maker author.

Editado por robi123 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Cara vamos entender esse erro é tudo questão de lógica  para falar verdade !

 

 

File config.lua loaded from I:/Meu OT/Global 7.6/config.lua and it's not valid TFS config.lua file. Go to STEP 1 - select other directory. If it's your config.lua file from TFS contact with acc. maker author.

 

Ele fala que está carregando o config.lua no endereço em vermelho !

E dá uma alerta fala que sua TFS não é valida ! ou seja  o cara que programou quis dizer que sua database do seu server

não está de acordo com a do site que foi programada !

 

 

 

Editado por emersontb (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 3 months later...
Aqui eu tenho o mesmo erro, mas as 2 alternativas postadas aqui nao funcionaram

 

In file install.txt must be your IP!
In file is:
187.180.198.127
Your IP is:
127.0.0.1


Edite o install.txt remova tudo é coloque 127.0.0.1

O OP era só editar e colocar o ipv6: ::1 que corresponde a 127.0.0.1 em ipv4

Captura de tela de 2016-09-04 18:53:17.png

Em Desenvolvimento 

 

Tutoriais:

[PagSeguro] Novo Método de Retorno Automático

Link para o post
Compartilhar em outros sites
Em 01/12/2016 ás 22:46, Ivens Pontes disse:


Edite o install.txt remova tudo é coloque 127.0.0.1

O OP era só editar e colocar o ipv6: ::1 que corresponde a 127.0.0.1 em ipv4

 

Muito obrigado, funcionou certinho !

Link para o post
Compartilhar em outros sites

Alguem pode me ajudar com o seguinte problema? : Estou com um problema no gesior hora de criar a account   O site cria normal com o ip local: 127.0.0.1(localhost), mas quando tento criar pelo ip fixo, fica carregando e fica em branco, sem a conta ser criada, Porem, se a account ja está criada, ele loga normalmente pelo ip fixo.

Link para o post
Compartilhar em outros sites
  • 4 months later...
  • como corrigir o erro.

Error occured!

Error ID: #C-5
More info: ERROR: #C-5 : Class::ConfigPHP - Key passwordType doesn't exist.

File: C:\xampp1\htdocs\classes/configphp.php   Line: 96
File: C:\xampp1\htdocs\classes/website.php   Line: 123
File: C:\xampp1\htdocs/install.php   Line: 172

 

Dúvida Sanada!  :accept:

Editado por amoxicilina (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
Em 14/04/2017 ás 20:28, amoxicilina disse:
  • como corrigir o erro.

Error occured!

Error ID: #C-5
More info: ERROR: #C-5 : Class::ConfigPHP - Key passwordType doesn't exist.

File: C:\xampp1\htdocs\classes/configphp.php   Line: 96
File: C:\xampp1\htdocs\classes/website.php   Line: 123
File: C:\xampp1\htdocs/install.php   Line: 172

adicione essa linha abaixo das configurações na pasta do ot em config.lua

passwordType = "sha1"

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo