Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[PROBLEM] błąd przy instalacji skryptu www


Rekomendowane odpowiedzi

Opublikowano

Witam

Przy probie instalacji skryptu na stronie www wywala mi nastepujacy błąd

" common.php - Line N.: 77 Database: dating Error (1045) : Access denied for user 'root'@'localhost' (using password: YES) " czy ktos jest w stanie powiedzieć mi co z tym mozna zrobic z gory dziekuje za pomoc, dodam jeszcze ze po przesłaniu skryptu na serwer powinien pokazać sie ekran instalacyjny a zamiast tego wywala mi w/w błąd z tego co rozumiem z bľędu jest problem z połaczeniem z bazą danych bardzo prosze o pomoc pozdrawiam.

post-65665-0-50340800-1351927115.jpg

Opublikowano

Złe passy do bazy są podane. Zobacz tą 77 linie w pliku common.php ona pewnie wywołuje połączenie jakimś innym plikiem np. connection_sql.php czy database.php różnie to się może nazywać i będą tam takie linie przykładowo:

 

db_name "nazwa_bazy_danych"

db_user "nazwa_uzytkownika_bazy"

db_host "localhost" - adres bazy

db_password "mydelko_fa" - a tu hasło

 

I wszystko to musisz uzupełnić swoimi danymi.

07919872454565140601.png

Opublikowano

musisz podać poprawne dane do hosta bazy danych ;)

 

tak tylko ten plik wygląda następująco i szczerze mówiąc nie mam pojęcia w które miejsca dodać te dane:

 

 

<?php

/**
* Include file, initiates adodb and smarty libraries.
* Set smarty path-and-environment variables.
* Set language and modules settings.
*
* @package DatingPro
* @subpackage User Mode
**/

ini_set("display_errors", "0");
error_reporting(E_ALL);
if (!isset($_SESSION)) {
session_start();
}


/////// link for install
if(!$config["server"] && !$config["dbname"] && !$config["dbhost"] && !$config["dbuname"]){
$path = substr(__FILE__,0, -10);
echo "<script>location.href='./install/index.php'</script>";
exit;
}

/// sistem settings
if (substr(php_uname(), 0, 7) == "Windows") {
$config["system"] = "win";
} else {
$config["system"] = "unix";
}

$dir = $config["site_path"];
if (strlen($dir)==0) {
$dir = ".";
$dir = dirname(__FILE__);
}

///// for download temp files
$config["file_temp_path"] = $config["site_path"]."/templates_c";

switch ($config["system"]) {
case "unix":
ini_set("include_path", ".:".$dir.":".$dir."/include:".$dir."/adodb:".$dir."/smarty");
break;
case "win":
ini_set("include_path", ".;".$dir.";".$dir."/include;".$dir."/adodb;".$dir."/smarty");
break;
}

include_once "adodb/tohtml.inc.php";
include_once "adodb/adodb.inc.php";

function PN_DBMsgError($db='',$prg='',$line=0,$message='Error accesing to the database') {
$lcmessage = $message . "<br>" .
"Program: " . $prg . " - " . "Line N.: " . $line . "<br>" .
"Database: " . $db->database . "<br> ";

if ($db->ErrorNo()<>0) {
$lcmessage .= "Error (" . $db->ErrorNo() . ") : " . $db->ErrorMsg() . "<br>";
}
die($lcmessage);
}
$dbconn = &ADONewConnection($config['dbtype']);
GLOBAL $ADODB_FETCH_MODE;


$connectString = $config['dbtype'].":".$config['dbuname'].":".$config['dbpass']."@".$config['dbhost']."/".$config['dbname'];
$dbh = $dbconn->PConnect($config['dbhost'],($config['dbuname']),($config['dbpass']),$config['dbname']);

$ADODB_FETCH_MODE = ADODB_FETCH_NUM;

if ($dbh === false) {
error_log ("connect string: $connectString");
error_log ("error: " . $dbconn->ErrorMsg());
// show error and die
PN_DBMsgError($dbconn, __FILE__ , __LINE__, "Error connecting to db".$config['dbname']);
}

//utf-8
$dbconn->Execute("SET NAMES 'utf8' COLLATE 'utf8_general_ci'");

// Smarty
include_once "smarty/Smarty.class.php";

if ((isset($smarty) && !is_object($smarty)) || !isset($smarty))
$smarty = new Smarty;
$smarty->force_compile = false;
$smarty->template_dir = $dir."/templates/";
$smarty->compile_dir = $dir."/templates_c";
$smarty->plugins_dir = $dir."/smarty/plugins";
if(!$smarty) die("Smarty error");

$rs_smarty = $dbconn->Execute("Select value, name from ".SETTINGS_TABLE." where name like 'use_pilot_module_%' or
name in ('admin_theme_path','index_theme_path','index_theme_css_path','index_theme_images_path',
'default_lang','path_lang','date_format','use_success_stories',
'site_top_logotype', 'site_logotype_format', 'site_banner', 'site_banner_format', 'site_logotype_width',
'site_logotype_height', 'site_banner_width', 'site_banner_height','site_banner_color', 'user_banners_feature', 'voipcall_feature','color_theme')");
while(!$rs_smarty->EOF){
$config[$rs_smarty->fields[1]] = $rs_smarty->fields[0];
$smarty->assign($rs_smarty->fields[1], $rs_smarty->fields[0]);
$rs_smarty->MoveNext();
}
if (isset($config["color_theme"]) && $config["color_theme"] != "") {
$config["theme_postfix"] = "_".$config["color_theme"];
if ($config["theme_postfix"] == '_' || $config["theme_postfix"] == '_default') {
$config["theme_postfix"] = "";
}
} else {
$config["theme_postfix"] = "";
}
$smarty->assign("header_tpl","index_top".$config["theme_postfix"].".tpl");
$smarty->assign("footer_tpl","index_bottom".$config["theme_postfix"].".tpl");
$smarty->assign("theme_postfix",$config["theme_postfix"]);

if (isset($config['use_pilot_module_webmessenger']) && $config['use_pilot_module_webmessenger'] == 1) {
$rs_smarty = $dbconn->Execute("SELECT value, name FROM ".UP_MESSENGER_SETTINGS_TABLE." WHERE name IN ('presence_id','account_password') ");
while(!$rs_smarty->EOF){
$config[$rs_smarty->fields[1]] = $rs_smarty->fields[0];
$rs_smarty->MoveNext();
}
if (!isset($config['presence_id']) || !isset($config['account_password'])) {
$config['presence_id'] = "";
$config['account_password'] = "";
}
}

if(!$config["admin_theme_path"]) $config["admin_theme_path"] = "/templates/admin";
if(!$config["index_theme_path"]) $config["index_theme_path"] = "/templates/pilot_3_theme";
if (isset($theme_ident)) {
$config["index_theme_path"] = "/templates/".$theme_ident;
}

if(!$config["index_theme_css_path"]) $config["index_theme_css_path"] = "/css";
if(!$config["index_theme_images_path"]) $config["index_theme_images_path"] = "/images";

if ($config["system"] == "win"){
$smarty->assign("gentemplates", "file:".$dir.$config["index_theme_path"]);
$smarty->assign("admingentemplates", "file:".$dir.$config["admin_theme_path"]);
}else{
$smarty->assign("gentemplates", "file:".$config["site_path"].$config["index_theme_path"]);
$smarty->assign("admingentemplates", "file:".$config["site_path"].$config["admin_theme_path"]);
}

/// languages
if(!$config["default_lang"]) $config["default_lang"] = "1";
if(!$config["path_lang"]) $config["path_lang"] = "/languages";

if(isset($_GET["language_code"]) && strlen($_GET["language_code"])>0){
setcookie("language_cd", $_GET["language_code"], time()+7200);
$lang_code = $_GET["language_code"];
$config["default_lang"] = $_GET["language_code"];
} elseif (isset($_COOKIE["language_cd"]) && strval($_COOKIE["language_cd"])!="") {
$lang_code = $_COOKIE["language_cd"];
$config["default_lang"] = $_COOKIE["language_cd"];
} else {
$lang_code = $config["default_lang"];
}
//// load language interface
$strSQL = "select charset, lang_file, code FROM ".LANGUAGE_TABLE." where id='".$lang_code."'";
$rs = $dbconn->Execute($strSQL);
$charset = $rs->fields[0];
$lang_file = $rs->fields[1];
$lang_code = $rs->fields[2];


if(substr($config["path_lang"], -1) != "/" && substr($config["path_lang"], -1) != "\\") $config["path_lang"] = $config["path_lang"]."/";
if(substr($config["path_lang"], 0, 1) == "/" || substr($config["path_lang"],0,1) == "\\") $config["path_lang"] = substr($config["path_lang"],1);
if(substr($lang_file,0,1) == "/" || substr($lang_file,0,1) == "\\") $lang_file = substr($lang_file, 1);

include $config["path_lang"].$lang_file;

$smarty->assign("default_lang", $lang_code);
$smarty->assign("charset", $charset);
$smarty->assign("lang", $lang);

$smarty->assign("site_path", $config["site_path"]);
$smarty->assign("site_root", $config["site_root"]);
$smarty->assign("server", $config["server"].$config["site_root"]);

if (isset($config["social"])) {
$smarty->assign("social", $config["social"]);
} else {
$smarty->assign("social", 0);
}

global $_SERVER;
global $FILE_SELF;
$FILE_SELF = basename($_SERVER["PHP_SELF"]);

if ($config["use_pilot_module_msanalysis"] && !isset($msanalysis_ignore)) {
require_once($config["site_path"]."/msanalysis/counter.php");
require($config["site_path"]."/msanalysis/mstrack.php");
}

include $dir.$config["index_theme_path"].$config["index_theme_css_path"]."/config_color".$config["theme_postfix"].".php";

$config["color"] = $color;
$smarty->assign("css_color", $color);
if (isset($theme_ident)) {
$smarty->assign("theme_ident",$theme_ident);
}

$logo_setup['site_top_logotype'] = $config['site_top_logotype'];
$logo_setup['site_logotype_format'] = $config['site_logotype_format'];
$logo_setup['site_banner'] = $config['site_banner'];
$logo_setup['site_banner_format'] = $config['site_banner_format'];
$logo_setup['site_banner_color'] = (isset($config['site_banner_color']) && $config['site_banner_color']!="" && strlen($config['site_banner_color'])==6) ? $config['site_banner_color'] : $color["content"];
$logo_setup['site_logotype_width'] = $config['site_logotype_width'];
$logo_setup['site_logotype_height'] = $config['site_logotype_height'];
$logo_setup['site_banner_width'] = $config['site_banner_width'];
$logo_setup['site_banner_height'] = $config['site_banner_height'];
$smarty->assign("logo_setup", $logo_setup);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// paysystems
include_once "Payment_Config.php";

define('PAYMENT_DIR', $dir."/include/");
define('SYSTEMS_DIR', $dir."/include/systems/");

include_once "Payment_Data_Kipper.php";
include_once "Payment_Engine.php";

$config["paypal"] = 'extrabank';
$config["seller"] = 'gmail.com';

?>

a w intstrukcji instalacji skryptu jest opis że po wrzuceniu skryptu na stronę pojawi się na www instalator w załączniku wysyłam dany plik z którego wynika błąd

common.php

Specjalista
Opublikowano

błąd nie jest w tym pliku, ale w pliku o nazwie

config.php , albo podobnej , gdzie są zapisane dane konfiguracyjne ;)

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...