Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Grakle

nu aguento mais, essi erro me percegui a vida toda

Recommended Posts

PO nu aguento mais,todas versçoes q ja tentei,da o mesmo erro no mesmo arquivo e na mesma linha,po ae ja brinco muito,tipo,estou hospedado na mi@,ae ta,eu faço a transferinacia pelo FXP,ae quando entro,pra faze a adimistração do site,eli não abre aparece essi erro:>Fatal error: Call to undefined function: message_die() in /home/webcindario/clanhi/db/db.php on line 88

 

 

alguem me ajude: vou posta o codigo do db.php

 

PHP [/tr][tr]<?php

/***************************************************************************

* db.php

* -------------------

* begin : Saturday, Feb 13, 2001

* copyright : © 2001 The phpBB Group

* email : support@phpbb.com

*

* $Id: db.php,v 1.10 2002/03/18 13:35:22 psotfx Exp $

*

*

***************************************************************************/

 

/***************************************************************************

* This file is part of the phpBB2 port to Nuke 6.0 © copyright 2002

* by Tom Nitzschner (tom@toms-home.com)

* http://bbtonuke.sourceforge.net (or http://www.toms-home.com)

*

* As always, make a backup before messing with anything. All code

* release by me is considered sample code only. It may be fully

* functual, but you use it at your own risk, if you break it,

* you get to fix it too. No waranty is given or implied.

*

* Please post all questions/request about this port on http://bbtonuke.sourceforge.net first,

* then on my site. All original header code and copyright messages will be maintained

* to give credit where credit is due. If you modify this, the only requirement is

* that you also maintain all original copyright messages. All my work is released

* under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.

*

***************************************************************************/

 

/***************************************************************************

*

* This program is free software; you can redistribute it and/or modify

* it under the terms of the GNU General Public License as published by

* the Free Software Foundation; either version 2 of the License, or

* (at your option) any later version.

*

***************************************************************************/

 

global $forum_admin;

if ($forum_admin == 1) {

$the_include = "../../../db";

} elseif ($inside_mod == 1) {

$the_include = "../../db";

} else {

$the_include = "db";

}

 

switch($dbtype) {

 

case 'MySQL':

include("".$the_include."/mysql.php");

break;

 

case 'mysql4':

include("".$the_include."/mysql4.php");

break;

 

case 'postgres':

include("".$the_include."/postgres7.php");

break;

 

case 'mssql':

include("".$the_include."/mssql.php");

break;

 

case 'oracle':

include("".$the_include."/oracle.php");

break;

 

case 'msaccess':

include("".$the_include."/msaccess.php");

break;

 

case 'mssql-odbc':

include("".$the_include."/mssql-odbc.php");

break;

 

case 'db2':

include("".$the_include."/db2.php");

break;

 

}

 

$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);

if(!$db->db_connect_id) {

--:> linha 88 message_die(CRITICAL_ERROR, "Could not connect to the database");

}

 

?>

[/tr]

Compartilhar este post


Link para o post
Compartilhar em outros sites

Isso é no nuke, né?

 

Quando ele ñ consegu conectar ao banco de dados ele retorna a função: message_die(), como está Ñ está definida, ele dá o erro q você viu.

 

você pode simplesmente definir esta função, assim, quando o bd ñ estiver disponivel, ao invés dele retornar: 'Fatal error: Call to undefined function: message_die() ', ele irá retornar o conteúdo da função: 'message_die()'.

 

Ou comenta a linha onde chama está função e lá você dá um echo com um aviso, por exemplo.

 

Flwwwwwwwwwwwwwwww

Compartilhar este post


Link para o post
Compartilhar em outros sites

tipo,em localhost,e o nome do q?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Bom,eu fui la no arquivo config.php e arrumei,mas agora são os theme,parece q nnaõ tão consseguindo acha os thems! olha o erro q da!

 

Warning: main(language/lang-.php): failed to open stream: No such file or directory in /home/webcindario/clanhi/mainfile.php on line 197

 

Warning: main(): Failed opening 'language/lang-.php' for inclusion (include_path='.') in /home/webcindario/clanhi/mainfile.php on line 197

 

Warning: get_lang(admin/language/lang-.php): failed to open stream: No such file or directory in /home/webcindario/clanhi/mainfile.php on line 212

 

Warning: get_lang(): Failed opening 'admin/language/lang-.php' for inclusion (include_path='.') in /home/webcindario/clanhi/mainfile.php on line 212

 

Warning: head(themes//theme.php): failed to open stream: No such file or directory in /home/webcindario/clanhi/header.php on line 31

 

Warning: head(): Failed opening 'themes//theme.php' for inclusion (include_path='.') in /home/webcindario/clanhi/header.php on line 31

 

Fatal error: Call to undefined function: themeheader() in /home/webcindario/clanhi/header.php on line 47

 

 

vou coloca os codigos dos 2 arvquivos.php

 

1° mainfile.php

 

PHP [/tr]<?php

 

/************************************************************************/

/* PHP-NUKE: Advanced Content Management System */

/* ============================================ */

/* */

/* Copyright © 2002 by Francisco Burzi */

/* http://phpnuke.org */

/* */

/* This program is free software. You can redistribute it and/or modify */

/* it under the terms of the GNU General Public License as published by */

/* the Free Software Foundation; either version 2 of the License. */

/************************************************************************/

 

$phpver = phpversion();

if ($phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible')) {

if (extension_loaded('zlib')) {

ob_end_clean();

ob_start('ob_gzhandler');

}

} else if ($phpver > '4.0') {

if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {

if (extension_loaded('zlib')) {

$do_gzip_compress = TRUE;

ob_start();

ob_implicit_flush(0);

//header('Content-Encoding: gzip');

}

}

}

 

$phpver = explode(".", $phpver);

$phpver = "$phpver[0]$phpver[1]";

if ($phpver >= 41) {

$PHP_SELF = $_SERVER['PHP_SELF'];

}

 

if (!ini_get("register_globals")) {

import_request_variables('GPC');

}

 

foreach ($_GET as $secvalue) {

if ((eregi("<[^>]*script*\"?[^>]*>", $secvalue)) ||

(eregi("<[^>]*object*\"?[^>]*>", $secvalue)) ||

(eregi("<[^>]*iframe*\"?[^>]*>", $secvalue)) ||

(eregi("<[^>]*applet*\"?[^>]*>", $secvalue)) ||

(eregi("<[^>]*meta*\"?[^>]*>", $secvalue)) ||

(eregi("<[^>]*style*\"?[^>]*>", $secvalue)) ||

(eregi("<[^>]*form*\"?[^>]*>", $secvalue)) ||

(eregi("\([^>]*\"?[^)]*\)", $secvalue)) ||

(eregi("\"", $secvalue))) {

die ("<center><img src=images/logo.gif><br><br><b>The html tags you attempted to use are not allowed</b><br><br>[ <a href=\"java script:history.go(-1)\"><b>Go Back</b></a> ]");

}

}

 

foreach ($_POST as $secvalue) {

if ((eregi("<[^>]*script*\"?[^>]*>", $secvalue)) || (eregi("<[^>]*style*\"?[^>]*>", $secvalue))) {

die ("<center><img src=images/logo.gif><br><br><b>The html tags you attempted to use are not allowed</b><br><br>[ <a href=\"java script:history.go(-1)\"><b>Go Back</b></a> ]");

}

}

 

if (eregi("mainfile.php",$PHP_SELF)) {

Header("Location: index.php");

die();

}

 

if ($forum_admin == 1) {

require_once("../../../config.php");

require_once("../../../db/db.php");

} elseif ($inside_mod == 1) {

require_once("../../config.php");

require_once("../../db/db.php");

} else {

require_once("config.php");

require_once("db/db.php");

/* FOLLOWING TWO LINES ARE DEPRECATED BUT ARE HERE FOR OLD MODULES COMPATIBILITY */

/* PLEASE START USING THE NEW SQL ABSTRACTION LAYER. SEE MODULES DOC FOR DETAILS */

require_once("includes/sql_layer.php");

$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);

}

 

if ($forum_admin == 1) {

require_once("../../../includes/die_functions.php");

} elseif ($inside_mod == 1) {

require_once("../../includes/die_functions.php");

} else {

require_once("includes/die_functions.php");

}

 

$mainfile = 1;

$sql = "SELECT sitename, nukeurl, site_logo, slogan, startdate, adminmail, anonpost, Default_Theme, foot1, foot2, foot3, commentlimit, anonymous, minpass, pollcomm, articlecomm, broadcast_msg, my_headlines, top, storyhome, user_news, oldnum, ultramode, banners, backend_title, backend_language, language, locale, multilingual, useflags, notify, notify_email, notify_subject, notify_message, notify_from, footermsgtxt, email_send, attachmentdir, attachments, attachments_view, download_dir, defaultpopserver, singleaccount, singleaccountname, numaccounts, imgpath, filter_forward, moderate, admingraphic, httpref, httprefmax, CensorMode, CensorReplace, copyright, Version_Num FROM ".$prefix."_config";

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$sitename = $row[sitename];

$nukeurl = $row[nukeurl];

$site_logo = $row[site_logo];

$slogan = $row[slogan];

$startdate = $row[startdate];

$adminmail = $row[adminmail];

$anonpost = $row[anonpost];

$Default_Theme = $row[Default_Theme];

$foot1 = $row[foot1];

$foot2 = $row[foot2];

$foot3 = $row[foot3];

$commentlimit = $row[commentlimit];

$commentlimit = intval($commentlimit);

$anonymous = $row[anonymous];

$minpass = $row[minpass];

$minpass = intval($minpass);

$pollcomm = $row[pollcomm];

$pollcomm = intval($pollcomm);

$articlecomm = $row[articlecomm];

$articlecomm = intval($articlecomm);

$broadcast_msg = $row[broadcast_msg];

$broadcast_msg = intval($broadcast_msg);

$my_headlines = $row[my_headlines];

$my_headlines = intval($my_headlines);

$top = $row[top];

$top = intval($top);

$storyhome = $row[storyhome];

$storyhome = intval($storyhome);

$user_news = $row[user_news];

$user_news = intval($user_news);

$oldnum = $row[oldnum];

$oldnum = intval($oldnum);

$ultramode = $row[ultramode];

$ultramode = intval($ultramode);

$banners = $row[banners];

$banners = intval($banners);

$backend_title = $row[backend_title];

$backend_language = $row[backend_language];

$language = $row[language];

$locale = $row[locale];

$multilingual = $row[multilingual];

$multilingual = intval($multilingual);

$useflags = $row[useflags];

$useflags = intval($useflags);

$notify = $row[notify];

$notify = intval($notify);

$notify_email = $row[notify_email];

$notify_subject = $row[notify_subject];

$notify_message = $row[notify_message];

$notify_from = $row[notify_from];

$footermsgtxt = $row[footermsgtxt];

$email_send = $row[email_send];

$email_send = intval($email_send);

$attachmentdir = $row[attachmentdir];

$attachments = $row[attachments];

$attachments = intval($attachments);

$attachments_view = $row[attachments_view];

$attachments_view = intval($attachments_view);

$download_dir = $row[download_dir];

$defaultpopserver = $row[defaultpopserver];

$singleaccount = $row[singleaccount];

$singleaccount = intval($singleaccount);

$singleaccountname = $row[singleaccountname];

$numaccounts = $row[numaccounts];

$imgpath = $row[imgpath];

$filter_forward = $row[filter_forward];

$filter_forward = intval($filter_forward);

$moderate = $row[moderate];

$moderate = intval($moderate);

$admingraphic = $row[admingraphic];

$admingraphic = intval($admingraphic);

$httpref = $row[httpref];

$httpref = intval($httpref);

$httprefmax = $row[httprefmax];

$httprefmax = intval($httprefmax);

$CensorMode = $row[CensorMode];

$CensorMode = intval($CensorMode);

$CensorReplace = $row[CensorReplace];

$copyright = $row[copyright];

$Version_Num = $row[Version_Num];

$domain = eregi_replace("http://", "", $nukeurl);

$tipath = "images/topics/";

$mtime = microtime();

$mtime = explode(" ",$mtime);

$mtime = $mtime[1] + $mtime[0];

$start_time = $mtime;

 

if ($forum_admin != 1) {

if (isset($newlang) AND !eregi("\.","$newlang")) {

if (file_exists("language/lang-$newlang.php")) {

setcookie("lang",$newlang,time()+31536000);

include("language/lang-$newlang.php");

$currentlang = $newlang;

} else {

setcookie("lang",$language,time()+31536000);

include("language/lang-$language.php");

$currentlang = $language;

}

} elseif (isset($lang)) {

include("language/lang-$lang.php");

$currentlang = $lang;

} else {

setcookie("lang",$language,time()+31536000);

include("language/lang-$language.php");

$currentlang = $language;

}

}

 

function get_lang($module) {

global $currentlang, $language;

if (file_exists("modules/$module/language/lang-$currentlang.php")) {

if ($module == admin) {

include_once("admin/language/lang-$currentlang.php");

} else {

include_once("modules/$module/language/lang-$currentlang.php");

}

} else {

if ($module == admin) {

include_once("admin/language/lang-$currentlang.php");

} else {

include_once("modules/$module/language/lang-$language.php");

}

}

}

 

function is_admin($admin) {

global $prefix, $db;

if(!is_array($admin)) {

$admin = base64_decode($admin);

$admin = explode(":", $admin);

$aid = "$admin[0]";

$pwd = "$admin[1]";

} else {

$aid = "$admin[0]";

$pwd = "$admin[1]";

}

if ($aid != "" AND $pwd != "") {

$aid = trim($aid);

$sql = "SELECT pwd FROM ".$prefix."_authors WHERE aid='$aid'";

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$pass = $row[pwd];

if($pass == $pwd && $pass != "") {

return 1;

}

}

return 0;

}

 

function is_user($user) {

global $prefix, $db, $user_prefix;

if(!is_array($user)) {

$user = base64_decode($user);

$user = explode(":", $user);

$uid = "$user[0]";

$pwd = "$user[2]";

} else {

$uid = "$user[0]";

$pwd = "$user[2]";

}

$uid = addslashes($uid);

$uid = intval($uid);

if ($uid != "" AND $pwd != "") {

$sql = "SELECT user_password FROM ".$user_prefix."_users WHERE user_id='$uid'";

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$pass = $row[user_password];

if($pass == $pwd && $pass != "") {

return 1;

}

}

return 0;

}

 

function is_group($user, $name) {

global $prefix, $db, $user_prefix;

if(!is_array($user)) {

$user = base64_decode($user);

$user = explode(":", $user);

$uid = "$user[0]";

$pwd = "$user[2]";

} else {

$uid = "$user[0]";

$pwd = "$user[2]";

}

if ($uid != "" AND $pwd != "") {

$sql = "SELECT user_password FROM ".$user_prefix."_users WHERE user_id='$uid'";

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$pass = $row[user_password];

if($pass == $pwd && $pass != "") {

$sql = "SELECT points FROM ".$user_prefix."_users WHERE user_id='$uid'";

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$points = $row[points];

$sql = "SELECT mod_group FROM ".$prefix."_modules WHERE title='$name'";

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$mod_group = $row[mod_group];

$sql = "SELECT points FROM ".$prefix."_groups WHERE id='$mod_group'";

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$grp = $row[points];

if (($points >= 0 AND $points >= $grp) OR $mod_group == 0) {

return 1;

}

}

}

return 0;

}

 

function update_points($id) {

global $user_prefix, $prefix, $db, $user;

if (is_user($user)) {

if(!is_array($user)) {

$user1 = base64_decode($user);

$user1 = explode(":", $user1);

$username = "$user1[1]";

} else {

$username = "$user1[1]";

}

if ($db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_groups")) > 0) {

$row = $db->sql_fetchrow($db->sql_query("SELECT points FROM ".$prefix."_groups_points WHERE id='$id'"));

$db->sql_query("UPDATE ".$user_prefix."_users SET points=points+$row[points] WHERE username='$username'");

}

}

}

 

function title($text) {

OpenTable();

echo "<center><font class=\"title\"><b>$text</b></font></center>";

CloseTable();

echo "<br>";

}

 

function is_active($module) {

global $prefix, $db;

$module = trim($module);

$sql = "SELECT active FROM ".$prefix."_modules WHERE title='$module'";

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$act = $row[active];

$act = intval($act);

if (!$result OR $act == 0) {

return 0;

} else {

return 1;

}

}

 

function render_blocks($side, $blockfile, $title, $content, $bid, $url) {

if ($url == "") {

if ($blockfile == "") {

if ($side == "c") {

themecenterbox($title, $content);

} elseif ($side == "d") {

themecenterbox($title, $content);

} else {

themesidebox($title, $content);

}

} else {

if ($side == "c") {

blockfileinc($title, $blockfile, 1);

} elseif ($side == "d") {

blockfileinc($title, $blockfile, 1);

} else {

blockfileinc($title, $blockfile);

}

}

} else {

if ($side == "c" OR $side == "d") {

headlines($bid,1);

} else {

headlines($bid);

}

}

}

 

function blocks($side) {

global $storynum, $prefix, $multilingual, $currentlang, $db, $admin, $user;

if ($multilingual == 1) {

$querylang = "AND (blanguage='$currentlang' OR blanguage='')";

} else {

$querylang = "";

}

if (strtolower($side[0]) == "l") {

$pos = "l";

} elseif (strtolower($side[0]) == "r") {

$pos = "r";

} elseif (strtolower($side[0]) == "c") {

$pos = "c";

} elseif (strtolower($side[0]) == "d") {

$pos = "d";

}

$side = $pos;

$sql = "SELECT bid, bkey, title, content, url, blockfile, view, expire, action FROM ".$prefix."_blocks WHERE bposition='$pos' AND active='1' $querylang ORDER BY weight ASC";

$result = $db->sql_query($sql);

while($row = $db->sql_fetchrow($result)) {

$bid = $row[bid];

$bid = intval($bid);

$title = $row[title];

$content = $row[content];

$url = $row[url];

$blockfile = $row[blockfile];

$view = $row[view];

$expire = $row[expire];

$action = $row[action];

$now = time();

if ($expire != 0 AND $expire <= $now) {

if ($action == "d") {

$db->sql_query("UPDATE ".$prefix."_blocks SET active='0', expire='0' WHERE bid='$bid'");

return;

} elseif ($action == "r") {

$db->sql_query("DELETE FROM ".$prefix."_blocks WHERE bid='$bid'");

return;

}

}

if ($row[bkey] == admin) {

adminblock();

} elseif ($row[bkey] == userbox) {

userblock();

} elseif ($row[bkey] == "") {

if ($view == 0) {

render_blocks($side, $blockfile, $title, $content, $bid, $url);

} elseif ($view == 1 AND is_user($user) || is_admin($admin)) {

render_blocks($side, $blockfile, $title, $content, $bid, $url);

} elseif ($view == 2 AND is_admin($admin)) {

render_blocks($side, $blockfile, $title, $content, $bid, $url);

} elseif ($view == 3 AND !is_user($user) || is_admin($admin)) {

render_blocks($side, $blockfile, $title, $content, $bid, $url);

}

}

}

}

 

function message_box() {

global $bgcolor1, $bgcolor2, $user, $admin, $cookie, $textcolor2, $prefix, $multilingual, $currentlang, $db;

if ($multilingual == 1) {

$queryla

Compartilhar este post


Link para o post
Compartilhar em outros sites

2° header.php

PHP [/tr][tr]<?php

 

/************************************************************************/

/* PHP-NUKE: Advanced Content Management System */

/* ============================================ */

/* */

/* Copyright © 2002 by Francisco Burzi */

/* http://phpnuke.org */

/* */

/* This program is free software. You can redistribute it and/or modify */

/* it under the terms of the GNU General Public License as published by */

/* the Free Software Foundation; either version 2 of the License. */

/************************************************************************/

 

if (eregi("header.php",$_SERVER['PHP_SELF'])) {

Header("Location: index.php");

die();

}

 

require_once("mainfile.php");

 

##################################################

# Include some common header for HTML generation #

##################################################

 

$header = 1;

 

function head() {

global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;

$ThemeSel = get_theme();

include("themes/$ThemeSel/theme.php");

echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";

echo "<html>\n";

echo "<head>\n";

echo "<title>$sitename $pagetitle</title>\n";

 

include("includes/meta.php");

include("includes/javascript.php");

 

if (file_exists("themes/$ThemeSel/images/favicon.ico")) {

echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";

}

 

echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";

include("includes/my_header.php");

echo "\n\n\n</head>\n\n";

themeheader();

}

 

online();

head();

include("includes/counter.php");

global $home;

if ($home == 1) {

message_box();

blocks(Center);

}

 

?>

[/tr]

Compartilhar este post


Link para o post
Compartilhar em outros sites

Qual,eu estou usando o PHP-Nuke 7.0 CNB!

Compartilhar este post


Link para o post
Compartilhar em outros sites

os q são especificados nas linhas de erro, mas é mais fácil você mandar upar td de novo, sme regravar, assim ele grava só os q estiverem faltando.Flwwwwwwwwwwwww

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.