SpUpUz
Pizzaman
Posts: 21
Posted: Aug 17, 2004
the only error i have is that... down the pge
Fatal error: Cannot redeclare head() (previously declared in /web/htdocs/www.spupuz.it/home/ironandfire/pncms/header.php:44) in /web/htdocs/www.spupuz.it/home/ironandfire/pncms/header.php on line 42
the site is www.spupuz.it
maybe you can help me.
Chestnut
Site Admin
Posts: 1320
Posted: Aug 17, 2004
mmm check if one of your root file (index.php, header.php, etc) is properly uploaded...
I often have this kind of crap and I found that one of the files doesn\'t go to the other side properly, example :
Code //blablabla
code here
ending php tag :
?>
oups, still have code here
}
another ending php tag
?>
I remove the last part or reupload and everything goes fine.
Chestnut ! Site Admin
SpUpUz
Pizzaman
Posts: 21
Posted: Aug 17, 2004
no more code look:
Code if (strpos(\\'header.php\\', $_SERVER[\\'PHP_SELF\\'])) {
die &
#40;\\"You can\\'t access this file directly...\\"); }
/**
* Include some common header for HTML generation.
*
* XHTML Support by Matt Jarjoura. <mjarjo1@umbc.edu>
*/
$header = 1 ;
function head() {
$artpage ,
$topic ,
$hlpfile ,
$hr ,
$theme ,
$bgcolor1 ,
$bgcolor2 ,
$bgcolor3 ,
$bgcolor4 ,
$bgcolor5 ,
$textcolor1 ,
$textcolor2 ,
$textcolor3 ,
$textcolor4 ,
$forumpage ,
$thename ,
$postnuke_theme ,
//$pntheme,
$themename ,
$themeimages ,
$additional_header ,
$themeOverrideCategory ,
$themeOverrideStory ;
// modification mouzaia .71
$cWhereIsPerso = WHERE_IS_PERSO;
if ( !(empty($cWhereIsPerso)) ) {
include(\\"modules/NS-Multisites/head.inc.php\\");
} else {
$thistheme = pnVarPrepForOs(pnUserGetTheme());
if (@file(WHERE_IS_PERSO.\\"themes/\\".$thistheme.\\"/theme.php\\")) {
$themesarein = WHERE_IS_PERSO;
} else {
$themesarein = \\"\\";
}
}
if (!isset($GLOBALS[\\'xanthia_theme\\']) || !$GLOBALS[\\'xanthia_theme\\']) {
ob_start();
echo \\"<!DOCTYPE HTML PUBLIC \\\\"-
//W3C//DTD HTML 4.01 Transitional//EN\\\\">\\n\\"; echo \\"<html>\\n<head>\\n\\";
if (defined(\\"_CHARSET\\") && _CHARSET != \\"\\") {
echo \\"<meta http-equiv=\\\\"Content-Type\\\\" \\".
\\"content=\\\\"text/html; charset=\\"._CHARSET.\\"\\\\">\\n\\";
}
if ($artpage==1) {
/**
* article page output
*/
echo \\"<title>
$info &
#91;title] :: \\".pnConfigGetVar(\\'sitename\\').\\' :: \\'.pnConfigGetVar(\\'slogan\\').\\"</title>\\n\\"; if (pnConfigGetVar(\\'dyn_keywords\\') == 1) {
$htmlless = check_html($info[\\'maintext\\'], $strip =\\'nohtml\\');
$symbolLess = trim(ereg_replace(\\'(\\"|\\?|!|:|\\.|\\(|\\)|;|\\\\\\\\)+\\', \\' \\', $htmlless));
$keywords = ereg_replace(\\'( |\\'.CHR(10).\\'|\\'.CHR(13).\\')+\\', \\',\\', $symbolLess);
$metatags = ereg_replace(\\",+\\", \\",\\",$keywords);
echo \\"<meta http-equiv=\\\\"Keywords\\\\" content=\\\\"
$metatags \\\\">\\n\\";
} else {
echo \\"<meta name=\\\\"KEYWORDS\\\\" content=\\\\"\\".pnConfigGetVar&
#40;\\'metakeywords\\').\\"\\\\">\\n\\"; }
} else {
/**
* all other page output
*/
echo \\
'<title>\ \' .pnConfigGetVar(\ \' sitename\ \' ).\ \' :: \ \' .pnConfigGetVar(\ \' slogan\ \' ).\ \& quot;</title>\ \ n\ \& quot;; echo \ \' <meta name=\ \& quot;KEYWORDS\ \& quot; content=\ \& quot;\ \' .pnConfigGetVar(\ \' metakeywords\ \' ).\ \& quot;\ \ \ \& quot;>\ \ n\ \& quot;;
}
echo \ \' <meta name=\ \& quot;DESCRIPTION\ \& quot; content=\ \& quot;\ \' .pnConfigGetVar(\ \' slogan\ \' ).\ \& quot;\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \& quot;<meta name=\ \ \ \& quot;ROBOTS\ \ \ \& quot; content=\ \ \ \& quot;INDEX,FOLLOW\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \& quot;<meta name=\ \ \ \& quot;resource-type\ \ \ \& quot; content=\ \ \ \& quot;document\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \& quot;<meta http-equiv=\ \ \ \& quot;expires\ \ \ \& quot; content=\ \ \ \& quot;0\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \' <meta name=\ \& quot;author\ \& quot; content=\ \& quot;\ \' .pnConfigGetVar(\ \' sitename\ \' ).\ \& quot;\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \' <meta name=\ \& quot;copyright\ \& quot; content=\ \& quot;Copyright (c) 2003 by \ \' .pnConfigGetVar(\ \' sitename\ \' ).\ \& quot;\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \& quot;<meta name=\ \ \ \& quot;revisit-after\ \ \ \& quot; content=\ \ \ \& quot;1 days\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \& quot;<meta name=\ \ \ \& quot;distribution\ \ \ \& quot; content=\ \ \ \& quot;Global\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \& quot;<meta name=\ \ \ \& quot;generator\ \ \ \& quot; content=\ \ \ \& quot;PostNuke - http://www.postnuke.com\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \& quot;<meta name=\ \ \ \& quot;rating\ \ \ \& quot; content=\ \ \ \& quot;General\ \ \ \& quot;>\ \ n\ \& quot;;
global $themesarein;
echo \ \& quot;<link rel=\ \ \ \& quot;StyleSheet\ \ \ \& quot; href=\ \ \ \& quot;\ \& quot;.$themesarein.\ \& quot;themes/\ \& quot;.$thistheme.\ \& quot;/style/styleNN.css\ \ \ \& quot; type=\ \ \ \& quot;text/css\ \ \ \& quot;>\ \ n\ \& quot;;
echo \ \& quot;<style type=\ \ \ \& quot;text/css\ \ \ \& quot;>\ \& quot;;
echo \ \& quot;@import url(\ \ \ \& quot;\ \& quot;.$themesarein.\ \& quot;themes/\ \& quot;.$thistheme.\ \& quot;/style/style.css\ \ \ \& quot;); \ \& quot;;
echo \ \& quot;</style>\ \ n\ \& quot;;
echo \ \& quot;<script type=\ \ \ \& quot;text/javascript\ \ \ \& quot; src=\ \ \ \& quot;javascript/showimages.js\ \ \ \& quot;></script>\ \ n\ \ n\ \& quot;;
echo \ \& quot;<script type=\ \ \ \& quot;text/javascript\ \ \ \& quot; src=\ \ \ \& quot;javascript/openwindow.js\ \ \ \& quot;></script>\ \ n\ \ n\ \& quot;;
if(isset($additional_header)) {
echo @implode(\ \& quot;\ \ n\ \& quot;, $additional_header);
}
}
themeheader();
}
/**
* if you want to do overrides, set the global vars $themeOverrideCategory
* and/or $themeOverrideStory before including header.php
*/
head();
include_once(\ \' includes/pncbotcount.php\ \' );
?>
Chestnut
Site Admin
Posts: 1320
Posted: Aug 17, 2004
And the other files ? footer especially since your problem is after the footer...
Chestnut ! Site Admin
SpUpUz
Pizzaman
Posts: 21
Posted: Aug 17, 2004
problem is only in home ( i use blickhome ) module.
Code <?php
// File: $Id: footer.php,v 1.18 2004/08/10 11:16:06 markwest Exp $ $Name: HEAD $
// ----------------------------------------------------------------------
// PostNuke Content Management System
// Copyright (C) 2001 by the PostNuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Francisco Burzi
// Purpose of file:
// ----------------------------------------------------------------------
if (stristr('footer.php', $_SERVER['PHP_SELF'])) {
die &
#40;"You can't access this file directly..."); }
// XHTML Support by Matt Jarjoura. <mjarjo1@umbc.edu>
function footmsg()
{
echo "<span
class =\"pn-sub\">\n".pnConfigGetVar&
#40;'foot1')."<br />\n</span>\n"; }
function foot()
{
// modification .71 multisites mouzaia
/* it should not be necessary here, since config.php is in a table.
if (!isset($index)) {
include(WHERE_IS_PERSO."config.php");
}
*/
themefooter();
if (!isset($GLOBALS['xanthia_theme']) || !$GLOBALS['xanthia_theme']) {
// show time to render
$mtime = explode(" ",microtime());
$dbg_endtime = $mtime [1] + $mtime[0];
$dbg_totaltime = ($dbg_endtime - $GLOBALS['dbg_starttime']);
if ($GLOBALS['pndebug']['pagerendertime']) {
printf("<div style=\"text-align:center\" class=\"pn-sub\">Page created in %f seconds.</div>", $dbg_totaltime);
}
if ($GLOBALS['pndebug']['debug']){
$GLOBALS ['dbg']->v($dbg_totaltime,"Page created in (seconds)");
$GLOBALS ['dbg']->v($GLOBALS['debug_sqlcalls'],"Number of SQL Calls");
}
// include typetool 8.0 [larsneo]
// (upload option disabled for security reasons)
$tt_enable = pnModGetVar('typetool', 'enable');
$baseURL = pnGetBaseURL();
$ModName = pnModGetName();
if ( is_numeric( $tt_enable ) && $tt_enable == 1) {
if (pnSecAuthAction(0, 'typetool::', "$ModName::", ACCESS_COMMENT) &&
$ModName != "Settings" &&
$ModName != "Permissions" &&
$ModName != "Censor") {
// enable the wysiwyg editor when user has at least comment rights
// no WYSIWYG in Settings, Permissions and Censor anyway...
echo "\n<!--Visual Editor Plug-in-->\n";
echo "<script type=\"text/javascript\">VISUAL=
0 ; FULLCTRL=
1 ; SECURE=
1 ; LANGUAGE=
'".pnModGetVar(' typetool
', ' language
')."' ;</script>\n";
echo "<script type=\"text/javascript\" src=
'".$baseURL."modules/typetool/pnincludes/quickbuild.js' ></script>\n";
echo "<!--
end Visual Editor Plug-in-->\n";
}
}
ob_end_flush();
}
}
echo $GLOBALS &
#91;'dmfooter']; foot();
include_once('includes/pncbotcount.php');
?>
Chestnut
Site Admin
Posts: 1320
Posted: Aug 17, 2004
Use the code tag to display code...
Is it me or you have put the include pncbotcount.php both in the header AND in the footer ?
Remove the one from the header...
Chestnut ! Site Admin
SpUpUz
Pizzaman
Posts: 21
Posted: Aug 17, 2004
sitll problem after removing from header.php
Chestnut
Site Admin
Posts: 1320
Posted: Aug 17, 2004
Then it might be Blockhome doing the problem... (PNphpBB2 had this for a time by having a second header but the error was something else...)...
With the use of Xanthia (and pnRender, you could do a blank mod, set it as home mod and add the blocks you need... you would reproduce the exact same thing without the use of a third party mod to do the same thing...
Well... of course, that would be possible IF you are using a Xanthia theme............ :P he he ! (Maybe autotheme also.Dunno, never used it.)
Chestnut ! Site Admin
SpUpUz
Pizzaman
Posts: 21
Posted: Aug 17, 2004
no i use xanthia... but i'm not ablo to create a blank mod... i installed forum 1.2g pnphpbb but i have a lot of problems.. probably i came back to 1.2f
Chestnut
Site Admin
Posts: 1320
Posted: Aug 17, 2004
Don't worry about the 1.2g... As you can see, one of the dev point me to a new fix today for the quotes problem but there are other things (redirection page showing stuff).
I must have a blank mod somewhere... will check.
Chestnut ! Site Admin
SpUpUz
Pizzaman
Posts: 21
Posted: Aug 17, 2004
tnx. for the blank module..
but for the forum i do have to have one working correclty.. i'm not a able scripter... i'm a system engineer :D
Chestnut
Site Admin
Posts: 1320
Posted: Aug 17, 2004
Try this one...
(It's a fast build but should work)...
Chestnut ! Site Admin
SpUpUz
Pizzaman
Posts: 21
Posted: Aug 17, 2004
so here's
http://forums.postnuke.com/index.php?name=PNphpBB2&file=viewtopic&p=116401#116401
Chestnut
Site Admin
Posts: 1320
Posted: Aug 17, 2004
:) Glad it had a fix...
(and that I was far from the real answer. )
Chestnut ! Site Admin