Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php][mysql] Problem z instalacja Burning board
-PigeonTOS-
post 26.12.2007, 12:23:28
Post #1





Goście







Nie wiem jak zainstalowac Burning board:


Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NIE) in /home/golab/domains/bou.linuxpl.com/public_html/acp/lib/class_db_mysql.php on line 30
SQL-DATABASE ERROR

Database error in WoltLab Burning Board: Link-ID == false, connect failed
mysql error: Access denied for user 'root'@'localhost' (using password: NIE)
mysql error number: 1045
Date: 26.12.2007 @ 12:21
Script: /
Referer:


-------------------------------------

  1. <?php
  2. class db {
  3.  
  4.  var $link_id = 0;
  5.  var $query_id = 0;
  6.  var $record  = array();
  7.  var $queries = array();
  8.  var $errdesc = "";
  9.  var $errno  = 0;
  10.  var $show_error = 1;
  11.  var $phpversion = 1;
  12.  
  13.  var $server  = "";
  14.  var $user  = "";
  15.  var $password = "";
  16.  var $database = "";
  17.  
  18.  var $appname = "WoltLab Burning Board";
  19.  
  20.  function db($server,$user,$password,$database,$phpversion=4) {
  21. $this->server=$server;
  22. $this->user=$user;
  23. $this->password=$password;
  24. $this->database=$database;
  25. $this->phpversion=$phpversion;
  26. $this->connect();
  27.  }
  28.  
  29.  function connect() {
  30. $this->link_id=mysql_connect($this->server,$this->user,$this->password);
  31. if (!$this->link_id) $this->error("Link-ID == false, connect failed");
  32. if ($this->database!="") $this->select_db($this->database);
  33.  }
  34.  
  35.  function geterrdesc() {
  36. $this->error=mysql_error();
  37. return $this->error;
  38.  }
  39.  
  40.  function geterrno() {
  41. $this->errno=mysql_errno();
  42. return $this->errno;
  43.  }
  44.  
  45.  function select_db($database="") {
  46. if ($database!="") $this->database=$database;
  47. if(!@mysql_select_db($this->database, $this->link_id)) $this->error("cannot use database ".$this->database);
  48.  }
  49.  
  50.  function query($query_string,$limit=0,$offset=0) {
  51. if($limit!=0) $query_string.=" LIMIT $offset, $limit";
  52. $this->queries[]="$query_string";
  53. $this->query_id = mysql_query($query_string,$this->link_id);
  54. if (!$this->query_id) $this->error("Invalid SQL: ".$query_string);
  55. return $this->query_id;
  56.  }
  57.  
  58.  function unbuffered_query($query_string,$LOW_PRIORITY=0) {
  59. if($this->phpversion<406) return $this->query($query_string);
  60. else {
  61.  if($LOW_PRIORITY==1) $query_string=substr($query_string,0,6)." LOW_PRIORITY".substr($query_string,6);
  62.  $this->queries[]="unbuffered: $query_string";
  63.  $this->query_id = mysql_unbuffered_query($query_string,$this->link_id);
  64.  if (!$this->query_id) $this->error("Invalid SQL: ".$query_string);
  65.  return $this->query_id;
  66. }
  67.  }
  68.  
  69.  function fetch_array($query_id=-1) {
  70. if ($query_id!=-1) $this->query_id=$query_id;
  71. $this->record = mysql_fetch_array($this->query_id);
  72. return $this->record;
  73.  }
  74.  
  75.  function fetch_row($query_id=-1) {
  76. if ($query_id!=-1) $this->query_id=$query_id;
  77. $this->record = mysql_fetch_row($this->query_id);
  78. return $this->record;
  79.  }
  80.  
  81.  function free_result($query_id=-1) {
  82. if ($query_id!=-1) $this->query_id=$query_id;
  83. return @mysql_free_result($this->query_id);
  84.  }
  85.  
  86.  function query_first($query_string,$limit=0,$offset=0) {
  87. $this->query($query_string,$limit,$offset);
  88. $returnarray=$this->fetch_array($this->query_id);
  89. $this->free_result($this->query_id);
  90. return $returnarray;
  91.  }
  92.  
  93.  function num_rows($query_id=-1) {
  94. if ($query_id!=-1) $this->query_id=$query_id;
  95. return mysql_num_rows($this->query_id);
  96.  }
  97.  
  98.  function affected_rows() {
  99. return mysql_affected_rows($this->link_id);
  100.  }
  101.  
  102.  function insert_id() {
  103. return mysql_insert_id($this->link_id);
  104.  }
  105.  
  106.  function error($errormsg) {
  107. $this->errdesc=mysql_error();
  108. $this->errno=mysql_errno();
  109.  
  110. $errormsg="<b>Database error in $this->appname:</b> $errormsg\n<br>";
  111. $errormsg.="<b>mysql error:</b> $this->errdesc\n<br>";
  112. $errormsg.="<b>mysql error number:</b> $this->errno\n<br>";
  113. $errormsg.="<b>Date:</b> ".date("d.m.Y @ H:i")."\n<br>";
  114. $errormsg.="<b>Script:</b> ".getenv("REQUEST_URI")."\n<br>";
  115. $errormsg.="<b>Referer:</b> ".getenv("HTTP_REFERER")."\n<br><br>";
  116.  
  117. if($this->show_error) $errormsg = "$errormsg";
  118. else $errormsg = "\n<!-- $errormsg -->\n";
  119. die("</table><font face=\"Verdana\" size=2><b>SQL-DATABASE ERROR</b><br><br>".$errormsg."</font>");
  120.  }
  121. }
  122. ?>










Mozecie mi jakos zaznaczyc lub powiedziec gdzie mam wpisac dane do bazy lub powiedziec jak przeprowadzic instalacje ?
Powód edycji: Dodałęm tag i bbcode. @drPayton
Go to the top of the page
+Quote Post
xbigos
post 26.12.2007, 12:28:15
Post #2





Grupa: Zarejestrowani
Postów: 239
Pomógł: 27
Dołączył: 13.07.2005
Skąd: Jarocin

Ostrzeżenie: (0%)
-----


Pierwsze co powinienes zrobić to przeczytać dokumentację.

http://www.woltlab.de/en/documentation/2.php#faq86
Jest napisane jak byk co masz zrobić. Pewnie nie rozpocząłeś instalacji.


--------------------
Go to the top of the page
+Quote Post
-ed-
post 26.12.2007, 12:29:16
Post #3





Goście







var $server = "localhost";
var $user = "root";
var $password = "pass";
var $database = "baza";
Go to the top of the page
+Quote Post
drPayton
post 26.12.2007, 12:29:54
Post #4





Grupa: Zarejestrowani
Postów: 890
Pomógł: 65
Dołączył: 13.11.2005
Skąd: Olsztyn

Ostrzeżenie: (0%)
-----


Nie tu, to jest tylko klasa obsługi bazy. Musisz poszukać pliku, w którym ustawione są dane konfiguracyjne (config.php, config.inc.php czy coś w tym stylu) i tam wisać odpowiednie parametry.

Pozdrawiam!
Go to the top of the page
+Quote Post
xbigos
post 26.12.2007, 12:36:31
Post #5





Grupa: Zarejestrowani
Postów: 239
Pomógł: 27
Dołączył: 13.07.2005
Skąd: Jarocin

Ostrzeżenie: (0%)
-----


Cytat(ed @ 26.12.2007, 12:29:16 ) *
var $server = "localhost";
var $user = "root";
var $password = "pass";
var $database = "baza";


I po co go wprowadzasz w błąd?

w dokumentacji jest wszystko ładnie opisane
Cytat
You can now open http://www.your-domain.com/wbb2/acp/setup.php in your Internet browser. Please select if you want to execute a new installation or an update from wBB1. If you click on "Continue" there will be a screen where you have to enter your database access data. If it is not your own server you can get this data from your hoster. For "Board number" it is recommended to use "1". If you have already other Burning Boards installed in the same database you may need to take a different number.

If you want to update from wBB1 it is important to use a different number than wBB1. (see step 4 - _data.inc.php)

Click on "Save" and follow the installation.


--------------------
Go to the top of the page
+Quote Post
-PigeonTOS-
post 26.12.2007, 12:51:02
Post #6





Goście







Edytowalem plik config.inc.php wpisalem :

<?php
// Hostname oder IP des MySQL-Servers
$sqlhost = "localhost";
// Username und Passwort zum einloggen in den Datenbankserver
$sqluser = "root";
$sqlpassword = "moje haslo";
// Name der Datenbank
$sqldb = "nazwa bazy mojej;
// Nummer des Boards
$n = "1";
// Email des Admins
$adminmail = "moj email";
?>


Podczas instalacji podalem takie same dane i mam teraz taki blad:

Warning: fopen(lib/config.inc.php) [function.fopen]: failed to open stream: Permission denied in /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php on line 113

Warning: fwrite(): supplied argument is not a valid stream resource in /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php on line 126

Warning: fclose(): supplied argument is not a valid stream resource in /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php on line 127

Warning: Cannot modify header information - headers already sent by (output started at /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php:113) in /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php on line 128





Linia od 113 do 128:


if(isset($_POST['send'])) {
$fp=fopen("lib/config.inc.php","w+");
fwrite($fp,"<?php
// Hostname or IP of your MySQL Server
\$sqlhost = \"".str_replace("\"","\\\\\"",$_POST['sqlhost'])."\";
// Username and Password to Login to your Database
\$sqluser = \"".str_replace("\"","\\\\\"",$_POST['sqluser'])."\";
\$sqlpassword = \"".str_replace("\"","\\\\\"",$_POST['sqlpassword'])."\";
// Name of your Database
\$sqldb = \"".str_replace("\"","\\\\\"",$_POST['sqldb'])."\";
// Number of this Forum
\$n = \"".intval($_POST['n'])."\";
// Email Address of the Administrator
\$adminmail = \"".str_replace("\"","\\\\\"",$_POST['adminmail'])."\";
?>");
fclose($fp);
header("Location: setup.php?step=2&mode=$mode");
exit();
}
else {
require("./lib/config.inc.php");
?>



Dodam, ze mam Burning board lite ... nie ta platna wersje
Go to the top of the page
+Quote Post
xbigos
post 26.12.2007, 12:57:20
Post #7





Grupa: Zarejestrowani
Postów: 239
Pomógł: 27
Dołączył: 13.07.2005
Skąd: Jarocin

Ostrzeżenie: (0%)
-----


Posłuchaj. Nie edytuj plików wrzuć wszystko od nowa. Potem uruchom

http://localhost/sciezka_do_forum/acp/setup.php

potem wklepujesz wszystkie dane. robisz dalej podajesz dalej dane usuwasz plik setup.php i update.php i po krzyku.


--------------------
Go to the top of the page
+Quote Post
-PigeonTOS-
post 26.12.2007, 13:10:19
Post #8





Goście







~xbigos zrobilem tak jak mowiles i nadal mam:

Warning: fopen(lib/config.inc.php) [function.fopen]: failed to open stream: Permission denied in /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php on line 113

Warning: fwrite(): supplied argument is not a valid stream resource in /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php on line 126

Warning: fclose(): supplied argument is not a valid stream resource in /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php on line 127

Warning: Cannot modify header information - headers already sent by (output started at /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php:113) in /home/golab/domains/bou.linuxpl.com/public_html/acp/setup.php on line 128

Nie wiem moze cos z chmodami mam nie tak bo nie mam tych plikow, ktore sa w opisie instalacji, ktorym trzeba zmienic chmod ....
Go to the top of the page
+Quote Post
-PigeonTOS-
post 26.12.2007, 13:12:46
Post #9





Goście







Zmienilem chmod plikowi congif.inc.php na 777 i po instalacji mam takie cos:


Could not connect to database, one or more of the information you gave in the last step are wrong.


Sory, ze tak lamuje, ale z tym oprogramowaniem mam peirwszy raz stycznosc blinksmiley.gif
Go to the top of the page
+Quote Post
xbigos
post 26.12.2007, 14:35:13
Post #10





Grupa: Zarejestrowani
Postów: 239
Pomógł: 27
Dołączył: 13.07.2005
Skąd: Jarocin

Ostrzeżenie: (0%)
-----


Cytat
Could not connect to database, one or more of the information you gave in the last step are wrong.


na nasze to:
Nie można się połączyć z bazą, jedna lub więcej informacji które podałeś w ostatnim kroku są błędne.
Tak więc zwróć uwagę czy nazwę bazy danych masz dobrze.


--------------------
Go to the top of the page
+Quote Post
-PigeonTOS-
post 26.12.2007, 15:20:50
Post #11





Goście







Juz zainstalowane, style zrobilem ... ale jeszcze szukam jednej rzeczy ... jak sie nazywa plik od nazw ? cos jak folder /locale/ w innych oprogramowaniach bo gdzies przeciez musi byc zamieszczone te wszystkie angielskie slowa ... bo spolszczenia nie ma ..
Go to the top of the page
+Quote Post
xbigos
post 26.12.2007, 17:53:30
Post #12





Grupa: Zarejestrowani
Postów: 239
Pomógł: 27
Dołączył: 13.07.2005
Skąd: Jarocin

Ostrzeżenie: (0%)
-----


Z tego co zauważyłem forum nie ma pliku językowego wszystkie zmienne są w bazie danych a sztywne teksty w plikach tpl


--------------------
Go to the top of the page
+Quote Post
-PigeonTOS-
post 26.12.2007, 23:40:24
Post #13





Goście







Tak juz znalazlem. Ciezko sie robi forum na tym silniku blinksmiley.gif Jeszcze jedno ostatnie pytanie ... jak zakladam nowe forum lub kategorie to musze podac haslo i potem jak wchodze przez strone glowna w jakies podforum to musze wpisywac to haslo. Jak sie to wylacza ? Bo jak zostawiam puste pole to nie pomaga, a na angielskim sie nie znam blinksmiley.gif

xbigos wielkie dzieki za pomoc smile.gif
Go to the top of the page
+Quote Post
xbigos
post 27.12.2007, 12:00:53
Post #14





Grupa: Zarejestrowani
Postów: 239
Pomógł: 27
Dołączył: 13.07.2005
Skąd: Jarocin

Ostrzeżenie: (0%)
-----


Zainstaluj sobie phpBB ma bardzo dobry polski sup[port.
www.phpbb2.pl


--------------------
Go to the top of the page
+Quote Post
-PigeonTOS-
post 27.12.2007, 14:55:16
Post #15





Goście







Poedytowalem pliki .tpl smile.gif Nie wiecie moze gdzie sie dodaje wlasne pola w profilu ? smile.gif
Go to the top of the page
+Quote Post
xbigos
post 27.12.2007, 18:02:03
Post #16





Grupa: Zarejestrowani
Postów: 239
Pomógł: 27
Dołączył: 13.07.2005
Skąd: Jarocin

Ostrzeżenie: (0%)
-----


Jak chcesz dodac wlasne pole w profilu to musisz do tego dopisać kilka linii kodu. Ale zeby to zrobic musisz troche poznać budowe forum. a wiec musisz przeczytać źródła a nie szukać gotowych odpowiedzi.


--------------------
Go to the top of the page
+Quote Post
-PigeonTOS-
post 31.12.2007, 13:44:16
Post #17





Goście







Witam ponownie ... znalazlem juz kod na te pola w profilu. Dodalem to w plikach profile.php, usercp.php oraz dodalem nowe linie w plikach .tpl

Zrobilem takze nowe pola w bazie danych.


Gdy edytuje swoj profil i wpisuje w te nowe pola zawartosc np. Gadu Gadu: xxxxxxxx to po kliknieciu Zapisz to pole sie czysci .... co moze byc tego powodem ?
Go to the top of the page
+Quote Post
loff
post 31.12.2007, 13:58:22
Post #18





Grupa: Zarejestrowani
Postów: 39
Pomógł: 15
Dołączył: 21.03.2007
Skąd: Poznań

Ostrzeżenie: (0%)
-----


Cytat(PigeonTOS @ 31.12.2007, 13:44:16 ) *
Witam ponownie ... znalazlem juz kod na te pola w profilu. Dodalem to w plikach profile.php, usercp.php oraz dodalem nowe linie w plikach .tpl

Zrobilem takze nowe pola w bazie danych.
Gdy edytuje swoj profil i wpisuje w te nowe pola zawartosc np. Gadu Gadu: xxxxxxxx to po kliknieciu Zapisz to pole sie czysci .... co moze byc tego powodem ?


hyhy z tym forum nie miałem nigdy okazji pracowac ale na takie teoretyczne pytanie sprobuje odpowiedziec - Wartość tego pola nie zostaje zapisana biggrin.gif Teraz musisz sobie odpowiedzieć na pytanie "dlaczego?"
Go to the top of the page
+Quote Post
PigeonTOS
post 31.12.2007, 18:01:26
Post #19





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 31.12.2007
Skąd: Ostrowiec Swietokrzyski

Ostrzeżenie: (0%)
-----


To ja sie Was pytam dlaczego ? biggrin.gif Najlepiej niech ktos mi to opisze po kolei na wlasnym przykladzie ... smile.gif W przemo to latwizna bo przez PA sie robilo, a tu jest wyzsza magia biggrin.gif

PS. I jeszcze jedno .. jak moge zmienic w bazie danych, zeby w pole w profilu mozna bylo wpisywac litery nie cyfry i zeby to sie zapisalo i bylo widoczne ? tongue.gif

Ten post edytował PigeonTOS 31.12.2007, 21:54:20
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 25.07.2025 - 10:02