Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problem z instalacją skryptu php
Forum PHP.pl > Forum > PHP
forok
Witam.
Mam problem z zainstalowaniem skryptu a problem polega na tym że instalator skryptu nie wyświetla się w całości.Próbowałem zainstalować go na darmowym hostingu i tam wszystko było ok instalator był widoczny w całości,strona działa,a na płatnym hostingu coś nie gra.Wydaje mi się że to może jakiś delikatny błąd w kodzie i jeden serwer radzi s[php][/php]obie z nim a drugi już nie.Oto zawartość pliku install.php:może ktoś z was będzie lepiej orientował się w kodzie i coś znajdzie

<?
if($_GET)
{

$_SESSION['lang'] = $_GET['language'];

require_once "lang/".$_SESSION['lang']."/index.php";
}
?>
<html>
<head>
<title>Install</title>
<meta http-equiv="Content-Type"content="text/html; charset=iso-8859-2" />
</head>
<body >
<?php

if($_GET)
{




$pole1 = trim($_POST['pole1']);
$pole2 = trim($_POST['pole2']);
$pole3 = trim($_POST['pole3']);
$pole4 = trim($_POST['pole4']);
$pole5 = trim($_POST['pole5']);

$pole6 = trim($_POST['pole6']);
$pole7 = trim($_POST['pole7']);


if(empty($pole1) and empty($pole2)) {


echo '
<center>
'.$l_i_info.'
<form action=""method="post">
<table bgcolor="gray" align="center">
<tr>
<td valign="top">'.$l_i_lo.':</td>
<td>
<input type=text name="pole1" value="localhost" size="50"><br />
</td>
</tr>
<tr>
<td valign="top">'.$l_i_nub.':</td>
<td>
<input type=text name="pole2" size="50"><br />
</td>
</tr>
<tr>
<td valign="top">'.$l_i_hdb.':</td>
<td>
<input type="password" name="pole3" size="50"><br />
</td>
</tr>
<tr>
<td valign="top">'.$l_i_nb.':</td>
<td>
<input type=text name="pole4" size="50"><br />
</td>
</tr>
<tr>
<td valign="top">'.$l_i_la.':</td>
<td>
<input type=text name="pole6" size="50"><br />
</td>
</tr>
<tr>
<td valign="top">'.$l_i_ha.':</td>
<td>
<input type="password" name="pole7" size="50"><br />
</td>
</tr>
</table><br>
<input type="submit" value=zakoncz '.$l_i_z.' " />
</form>

</center>
';
} else {

$er=0;

$dane ='<?
@mysql_connect("'.$dpodpora_admin.'", "'.$dpodpora_baza2.'", "'.$lamborgini12.'");
@mysql_select_db("'.$pole4.'");
?>';


$file = "db_connect.php";
$fp = fopen($file, "w");
fwrite($fp,$dane);
fclose($fp);





echo'<table bgcolor="gray" align="center">';
echo"<tr>";
echo'<td align="left">';

require_once("db_connect.php");

$pyt = "CREATE TABLE `cats` (
`id` int(11) NOT NULL auto_increment,
`name` text NOT NULL,
`block` int(11) NOT NULL default '0',
`pod` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
);";
$odp = mysql_query($pyt);

if($odp)
{
echo'<b>Tabela cats</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela cats</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}


$pyt = "CREATE TABLE `error` (
`id` int(11) NOT NULL auto_increment,
`nick` text NOT NULL,
`email` text NOT NULL,
`problem` text NOT NULL,
`id_file` int(11) NOT NULL default '0',
`data` text NOT NULL,
PRIMARY KEY (`id`)
)";
$odp = mysql_query($pyt);

if($odp)
{
echo'<b>Tabela error</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela error</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}


$pyt = "CREATE TABLE `faq` (
`id` int(11) NOT NULL auto_increment,
`tytul` text NOT NULL,
`tresc` text NOT NULL,
`data` text NOT NULL,
PRIMARY KEY (`id`)
);";
$odp = mysql_query($pyt);

if($odp)
{
echo'<b>Tabela faq</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela faq</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}


$pyt = "CREATE TABLE `komentarze` (
`id` int(11) NOT NULL auto_increment,
`nick` text NOT NULL,
`email` text NOT NULL,
`tresc` text NOT NULL,
`movie` text NOT NULL,
`data` text NOT NULL,
`dzial` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
);";
$odp = mysql_query($pyt);

if($odp)
{
echo'<b>Tabela komentarze</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela komentarze</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

$pyt = "CREATE TABLE `movie` (
`tytul` text NOT NULL,
`opis` text NOT NULL,
`img` text NOT NULL,
`link` text NOT NULL,
`dodal` text NOT NULL,
`data` text NOT NULL,
`cat` text NOT NULL,
`id` int(11) NOT NULL auto_increment,
`ile` int(11) NOT NULL default '0',
`glosy` int(11) NOT NULL default '0',
`ocena` float NOT NULL default '0',
`view` int(11) NOT NULL default '0',
`active` int(11) NOT NULL default '0',
`tags` text NOT NULL,
`rss_data` text NOT NULL,
`dodalid` int(11) NOT NULL default '0',
`typ` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ;";

$odp = mysql_query($pyt);

if($odp)
{
echo'<b>Tabela movie</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela movie</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

$pyt = "CREATE TABLE `news` (
`id` int(11) NOT NULL auto_increment,
`tytul` text NOT NULL,
`tresc_m` text NOT NULL,
`tresc` text NOT NULL,
`data` text NOT NULL,
`dodal` text NOT NULL,
`czytan` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
);";
$odp = mysql_query($pyt);

if($odp)
{
echo'<b>Tabela news</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela news</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

A to ciąg dalszy:

$pyt = "CREATE TABLE `panels` (
`id` int(11) NOT NULL auto_increment,
`name` text NOT NULL,
`tresc` text NOT NULL,
`active` text NOT NULL,
`wen` text NOT NULL,
`nr` int(11) NOT NULL default '0',
`panels` text NOT NULL,
PRIMARY KEY (`id`)
) ;";

$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Tabela panels</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela panels</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

$pyt = "CREATE TABLE `newsletter` (
`id` int(11) NOT NULL auto_increment,
`email` text NOT NULL,
`stan` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
);";

$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Tabela newsletter</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela newsletter</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

$pyt = "CREATE TABLE `pw` (
`id` int(11) NOT NULL auto_increment,
`do` text NOT NULL,
`od` text NOT NULL,
`tresc` text NOT NULL,
`data` text NOT NULL,
`czyt` int(11) NOT NULL default '0',
`tytul` text NOT NULL,
PRIMARY KEY (`id`)
);";

$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Tabela pw</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela pw</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}


$pyt = "CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`email` text NOT NULL,
`password` text NOT NULL,
`login` text NOT NULL,
`dostep` text NOT NULL,
`strona` text NOT NULL,
`gg` text NOT NULL,
`a` text NOT NULL,
`email_b` int(11) NOT NULL default '0',
`u_sende` int(11) NOT NULL default '0',
`u_odp` int(11) NOT NULL default '0',
`u_odpt` text NOT NULL,
`img` text NOT NULL,
PRIMARY KEY (`id`)
) ;";

$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Tabela users</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela users</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

$pyt = "CREATE TABLE `viewpage` (
`id` int(11) NOT NULL auto_increment,
`tytul` text NOT NULL,
`tresc` text NOT NULL,
`data` text NOT NULL,
PRIMARY KEY (`id`)
);";

$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Tabela viewpage</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela viewpage</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

$pyt = "CREATE TABLE `ulubione` (
`id` int(11) NOT NULL auto_increment,
`idm` int(11) NOT NULL default '0',
`usr` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
);";

$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Tabela ulubione</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela ulubione</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

$pyt = "CREATE TABLE `ustawienia` (
`id` int(11) NOT NULL auto_increment,
`rr` text NOT NULL,
`kme` text NOT NULL,
`ocenianie` text NOT NULL,
`or` text NOT NULL,
`kr` text NOT NULL,
`add` text NOT NULL,
`addl` text NOT NULL,
`addm` text NOT NULL,
`ile_w` text NOT NULL,
`witam` text NOT NULL,
`ml` int(11) NOT NULL default '0',
`mr` int(11) NOT NULL default '0',
`rg` text NOT NULL,
`rd` text NOT NULL,
`rdl` text NOT NULL,
`rg_on` int(11) NOT NULL default '0',
`rd_on` int(11) NOT NULL default '0',
`rdl_on` int(11) NOT NULL default '0',
`adres` text NOT NULL,
`email` text NOT NULL,
`footer` text NOT NULL,
`wo` int(11) NOT NULL default '0',
`lang` text NOT NULL,
`theme` text NOT NULL,
`title` text NOT NULL,
`sk` text NOT NULL,
`opis` text NOT NULL,
`reg` text NOT NULL,
`y_add` text NOT NULL,
`g_add` text NOT NULL,
`img_add` text NOT NULL,
`ga_add` text NOT NULL,
`me_add` int(11) NOT NULL default '0',
`jakosc_img` int(11) NOT NULL default '0',
`max_file` int(11) NOT NULL default '0',
`upload_on` int(11) NOT NULL default '0',
`txt_img_on` int(11) NOT NULL default '0',
`txt_img_up` text NOT NULL,
`tags_on` int(11) NOT NULL default '0',
`token` int(11) NOT NULL default '0',
`embed_add` int(11) NOT NULL default '0',
`newsletter_obw` int(11) NOT NULL default '0',
`email_reg` int(11) NOT NULL default '0',
`addlink` int(11) NOT NULL default '0',
`errorz` int(11) NOT NULL default '0',
`news_on` int(11) NOT NULL default '0',
`news_wen` int(11) NOT NULL default '0',
`news_il` int(11) NOT NULL default '0',
`pod` int(11) NOT NULL default '0',
`vo` int(11) NOT NULL default '0',
`ulubione` int(11) NOT NULL default '0',
`rekf` int(11) NOT NULL default '0',
`rekft` text NOT NULL,
`rekm` int(11) NOT NULL default '0',
`rekmt` text NOT NULL,
`reknm` int(11) NOT NULL default '0',
`reknmt` text NOT NULL,
PRIMARY KEY (`id`)
);";

$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Tabela ustawienia</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Tabela ustawienia</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

$pyt ="INSERT INTO `ustawienia` VALUES (1, '1', '1', '1', '0', '0', '0', '1', '1', '10', 'V2l0YW0u', 0, 0, 'UmVrbGFtYSBH83Jh', 'UmVrbGFtYSBE87M=', 'UmVrbGFtYSBwb2Qgc3RvcGux', 0, 0, 0, 'http://www.adres.pl', 'email@email.pl', 'UG93ZXJlZCBieSA8YSBocmVmPVwiaHR0cDovL3d3dy5tb3ZpZS50c2ktZy5pbmZvXCI+VFNJLUcg
TW92aWUgMS43IDwvYT5Db3B5cmlnaHQgJiMxNjk7IDIwMDcgLSAyMDA4IDxhIGhyZWY9XCJodHRwOi8vd
3d3LnRzaS1nLmluZm9cIj5UU0ktRzwvYT4=', 1, 'polish', 'green', 'php video skrypt', 'php video skrypt', 'Php video skrypt', '', '1', '1', '1', '1', 1, 70, 1048576, 0, 1, 'napis', 1, 1, 1, 1, 1, 1, 1, 1, 0, 3, 1, 1, 1, 0, 'UmVrbGFtYSBws3l3YWqxY2E=', 0, 'UmVrbGFtYSBwb2QgZmlsbWlraWVtIHRyZbbmIA==', 0, 'UmVrbGFtYSBuYWQgZmlsbWlraWVtIHRyZbbmIA==');";
$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Zapis do tabeli ustawienia</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Zapis do tabeli ustawienia</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}

$pyt ="INSERT INTO `panels` VALUES (16, 'Login', '<? include(''panels/login/index.php'') ?>', '1', '2', 1, 'login');";
$odp = mysql_query($pyt);
$pyt ="INSERT INTO `panels` VALUES (3, 'Menu', '<a href=\"index.php\">Strona G&#322ówna</a><br>\r\n<a href=\"add.php\">Dodaj</a><br>\r\n<a href=\"register.php\">Rejestracja</a><br>\r\n<a href=\"najlepsze.php\">Najlepsze</a><br>\r\n<a href=\"najnowsze.php\">Najnowsze</a><br>\r\n<a href=\"faq.php\">FAQ</a><br>\r\n<a href=\"top10.php\">TOP 10</a><br>', '1', '1', 1, '');";
$odp = mysql_query($pyt);
$pyt ="INSERT INTO `panels` VALUES (15, 'Najlepsze', '<? include(''panels/najlepsze/index.php'') ?>', '1', '1', 4, 'najlepsze');";
$odp = mysql_query($pyt);
$pyt ="INSERT INTO `panels` VALUES (14, 'Najnowsze', '<? include(''panels/najnowsze/index.php'') ?>', '1', '1', 3, 'najnowsze');";
$odp = mysql_query($pyt);
$pyt ="INSERT INTO `panels` VALUES (19, 'Kategorie', '<? include(''panels/kategorie/index.php'') ?>', '1', '1', 2, 'kategorie');";
$odp = mysql_query($pyt);
$pyt ="INSERT INTO `panels` VALUES (13, 'Szukaj', '<? include(''panels/serach/index.php'') ?>', '1', '1', 2, 'serach');";
$odp = mysql_query($pyt);
$pyt ="INSERT INTO `panels` VALUES (24, 'Statystyki', '<? include(''panels/stat/index.php'') ?>', '1', '2', 5, 'stat');";
$odp = mysql_query($pyt);
$pyt ="INSERT INTO `panels` VALUES (17, 'NewsLetter', '<? include(''panels/newsletter/index.php'') ?>', '1', '2', 2, 'newsletter');";
$odp = mysql_query($pyt);
$pyt ="INSERT INTO `panels` VALUES (23, 'Kanal RSS', '<? include(''panels/rss/index.php'') ?>', '1', '2', 4, 'rss');";
$odp = mysql_query($pyt);
$pyt ="INSERT INTO `panels` VALUES (25, 'Losowy Filmik', '<? include(''panels/losowy-filmik/index.php'') ?>', '1', '2', 4, 'rss');";
$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Zapis do tabeli panels</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Zapis do tabeli panels</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}


$pyt = "INSERT INTO `users` VALUES (1, '', '".md5($pole7)."', '".$pole6."', '3', '', '', '', 0, 0, 0, '', '');";
$odp = mysql_query($pyt);
if($odp)
{
echo'<b>Dodanie admina</b> - <font color="lime"><b>OK</b></font><br>';
}
else
{
echo'<b>Dodanie admina</b> - <font color="red"><b>Error</b></font><br>';
$er++;
}


echo"</td>";
echo"</tr>";
echo"<tr>";
echo"<td align='center'>";
echo"<hr>";

if($er>=1)
{
echo $lang['er'];
}
else
{
echo $l_i_end;
echo $l_i_zch;
echo $l_i_adm;
echo $l_i_ind;
}


echo"</td>";
echo"</tr>";
echo"</table>";


};

}
else
{
echo'
<br>
<center>
<form action="" method="GET">
<select name="language">
';

$d = dir("lang");
while (false !== ($entry = $d->read())) {
if(is_dir($entry))
{
}
else
{

echo"<option>$entry</option>";
}
}
echo'
</select>
<input type="submit" value="Select">
</form>
</center>
';
}
?>
</body>
</html>
PawelC
daj to w odpowiednie bbcode
forok
A może ktoś pomoże mi to zainstalowaćquestionmark.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.