to previous topic Print topic to next topic

 Root :: Developments :: Others :: error after upgrade to pn 07.50 rc4
 Moderated by:
 
  Bottom  error after upgrade to pn 07.50 rc4
SpUpUz Posted: 17.08.2004, 11:02
Pizzaman
Pizzaman


registered: Apr 25, 2004
Posts: 21

Status:  offline
last visit: 18.08.04
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.
Top  SpUpUz send PM
 
Chestnut Posted: 17.08.2004, 17:17
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
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
  1. //blablabla
  2. code here
  3.  
  4. ending php tag :
  5. ?>
  6.  
  7.         oups, still have code here
  8.     }
  9. another ending php tag
  10. ?>


I remove the last part or reupload and everything goes fine.

Chestnut ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
SpUpUz Posted: 17.08.2004, 17:33
Pizzaman
Pizzaman


registered: Apr 25, 2004
Posts: 21

Status:  offline
last visit: 18.08.04
no more code look:

Code
  1. if (strpos(\\'header.php\\', $_SERVER[\\'PHP_SELF\\'])) {
  2.     die (\\"You can\\'t access this file directly...\\");
  3. }
  4.  
  5. /**
  6. * Include some common header for HTML generation.
  7. *
  8. * XHTML Support by Matt Jarjoura. <mjarjo1@umbc.edu>
  9. */
  10.  
  11. $header = 1;
  12.  
  13. function head&#40;) {
  14.  
  15.  global $index,
  16.         $artpage,
  17.         $topic,
  18.         $hlpfile,
  19.         $hr,
  20.         $theme,
  21.         $bgcolor1,
  22.         $bgcolor2,
  23.         $bgcolor3,
  24.         $bgcolor4,
  25.         $bgcolor5,
  26.         $textcolor1,
  27.         $textcolor2,
  28.         $textcolor3,
  29.         $textcolor4,
  30.         $forumpage,
  31.         $thename,
  32.         $postnuke_theme,
  33.         //$pntheme,
  34.         $themename,
  35.         $themeimages,
  36.         $additional_header,
  37.         $themeOverrideCategory,
  38.         $themeOverrideStory;
  39.  
  40.     // modification mouzaia .71
  41.     $cWhereIsPerso = WHERE_IS_PERSO;
  42.     if &#40; !(empty($cWhereIsPerso)) ) {
  43.         include&#40;\\"modules/NS-Multisites/head.inc.php\\");
  44.     &#125; else {
  45.         $thistheme = pnVarPrepForOs&#40;pnUserGetTheme());
  46.         global $themesarein;
  47.         if &#40;@file(WHERE_IS_PERSO.\\"themes/\\".$thistheme.\\"/theme.php\\")) {
  48.             $themesarein = WHERE_IS_PERSO;
  49.         &#125; else {
  50.             $themesarein = \\"\\";
  51.         &#125;
  52.     &#125;
  53.  
  54.     if &#40;!isset($GLOBALS[\\'xanthia_theme\\']) || !$GLOBALS[\\'xanthia_theme\\']) {
  55.         ob_start&#40;);
  56.         echo \\"<!DOCTYPE HTML PUBLIC \\\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\\">\\n\\";
  57.         echo \\"<html>\\n<head>\\n\\";
  58.  
  59.         if &#40;defined(\\"_CHARSET\\") && _CHARSET != \\"\\") {
  60.                 echo \\"<meta http-equiv=\\\\"Content-Type\\\\" \\".
  61.                          \\"content=\\\\"text/html; charset=\\"._CHARSET.\\"\\\\">\\n\\";
  62.         &#125;
  63.  
  64.         if &#40;$artpage==1) {
  65.             /**
  66.              * article page output
  67.              */
  68.             global $info, $hometext;
  69.             echo \\"<title>$info&#91;title] :: \\".pnConfigGetVar(\\'sitename\\').\\' :: \\'.pnConfigGetVar(\\'slogan\\').\\"</title>\\n\\";
  70.             if &#40;pnConfigGetVar(\\'dyn_keywords\\') == 1) {
  71.                $htmlless = check_html&#40;$info[\\'maintext\\'], $strip =\\'nohtml\\');
  72.                $symbolLess = trim&#40;ereg_replace(\\'(\\"|\\?|!|:|\\.|\\(|\\)|;|\\\\\\\\)+\\', \\' \\', $htmlless));
  73.                $keywords = ereg_replace&#40;\\'( |\\'.CHR(10).\\'|\\'.CHR(13).\\')+\\', \\',\\', $symbolLess);
  74.                $metatags = ereg_replace&#40;\\",+\\", \\",\\",$keywords);
  75.                echo \\"<meta http-equiv=\\\\"Keywords\\\\" content=\\\\"$metatags\\\\">\\n\\";
  76.             &#125; else {
  77.                echo \\"<meta name=\\\\"KEYWORDS\\\\" content=\\\\"\\".pnConfigGetVar&#40;\\'metakeywords\\').\\"\\\\">\\n\\";
  78.             &#125;
  79.         &#125; else {
  80.             /**
  81.              * all other page output
  82.              */
  83.             echo \\'<title>\\'.pnConfigGetVar(\\'sitename\\').\\' :: \\'.pnConfigGetVar(\\'slogan\\').\\&quot;</title>\\n\\&quot;;
  84.             echo \\'<meta name=\\&quot;KEYWORDS\\&quot; content=\\&quot;\\'.pnConfigGetVar(\\'metakeywords\\').\\&quot;\\\\&quot;>\\n\\&quot;;
  85.         }
  86.         echo \\'<meta name=\\&quot;DESCRIPTION\\&quot; content=\\&quot;\\'.pnConfigGetVar(\\'slogan\\').\\&quot;\\\\&quot;>\\n\\&quot;;
  87.         echo \\&quot;<meta name=\\\\&quot;ROBOTS\\\\&quot; content=\\\\&quot;INDEX,FOLLOW\\\\&quot;>\\n\\&quot;;
  88.         echo \\&quot;<meta name=\\\\&quot;resource-type\\\\&quot; content=\\\\&quot;document\\\\&quot;>\\n\\&quot;;
  89.         echo \\&quot;<meta http-equiv=\\\\&quot;expires\\\\&quot; content=\\\\&quot;0\\\\&quot;>\\n\\&quot;;
  90.         echo \\'<meta name=\\&quot;author\\&quot; content=\\&quot;\\'.pnConfigGetVar(\\'sitename\\').\\&quot;\\\\&quot;>\\n\\&quot;;
  91.         echo \\'<meta name=\\&quot;copyright\\&quot; content=\\&quot;Copyright (c) 2003 by \\'.pnConfigGetVar(\\'sitename\\').\\&quot;\\\\&quot;>\\n\\&quot;;
  92.         echo \\&quot;<meta name=\\\\&quot;revisit-after\\\\&quot; content=\\\\&quot;1 days\\\\&quot;>\\n\\&quot;;
  93.         echo \\&quot;<meta name=\\\\&quot;distribution\\\\&quot; content=\\\\&quot;Global\\\\&quot;>\\n\\&quot;;
  94.         echo \\&quot;<meta name=\\\\&quot;generator\\\\&quot; content=\\\\&quot;PostNuke - http://www.postnuke.com\\\\&quot;>\\n\\&quot;;
  95.         echo \\&quot;<meta name=\\\\&quot;rating\\\\&quot; content=\\\\&quot;General\\\\&quot;>\\n\\&quot;;
  96.         global $themesarein;
  97.         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;;
  98.         echo \\&quot;<style type=\\\\&quot;text/css\\\\&quot;>\\&quot;;
  99.         echo \\&quot;@import url(\\\\&quot;\\&quot;.$themesarein.\\&quot;themes/\\&quot;.$thistheme.\\&quot;/style/style.css\\\\&quot;); \\&quot;;
  100.         echo \\&quot;</style>\\n\\&quot;;
  101.         echo \\&quot;<script type=\\\\&quot;text/javascript\\\\&quot; src=\\\\&quot;javascript/showimages.js\\\\&quot;></script>\\n\\n\\&quot;;
  102.         echo \\&quot;<script type=\\\\&quot;text/javascript\\\\&quot; src=\\\\&quot;javascript/openwindow.js\\\\&quot;></script>\\n\\n\\&quot;;
  103.         if(isset($additional_header)) {
  104.             echo @implode(\\&quot;\\n\\&quot;, $additional_header);
  105.         }
  106.     }
  107.     themeheader();
  108. }
  109. /**
  110. * if you want to do overrides, set the global vars $themeOverrideCategory
  111. * and/or $themeOverrideStory before including header.php
  112. */
  113. head();
  114. include_once(\\'includes/pncbotcount.php\\');
  115. ?>
Top  SpUpUz send PM
 
Chestnut Posted: 17.08.2004, 18:02
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
And the other files ? footer especially since your problem is after the footer...


Chestnut ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
SpUpUz Posted: 17.08.2004, 18:11
Pizzaman
Pizzaman


registered: Apr 25, 2004
Posts: 21

Status:  offline
last visit: 18.08.04
problem is only in home ( i use blickhome ) module.

Code
  1. <?php
  2. // File: $Id: footer.php,v 1.18 2004/08/10 11:16:06 markwest Exp $ $Name: HEAD $
  3. // ----------------------------------------------------------------------
  4. // PostNuke Content Management System
  5. // Copyright (C) 2001 by the PostNuke Development Team.
  6. // http://www.postnuke.com/
  7. // ----------------------------------------------------------------------
  8. // Based on:
  9. // PHP-NUKE Web Portal System - http://phpnuke.org/
  10. // Thatware - http://thatware.org/
  11. // ----------------------------------------------------------------------
  12. // LICENSE
  13. //
  14. // This program is free software; you can redistribute it and/or
  15. // modify it under the terms of the GNU General Public License (GPL)
  16. // as published by the Free Software Foundation; either version 2
  17. // of the License, or (at your option) any later version.
  18. //
  19. // This program is distributed in the hope that it will be useful,
  20. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22. // GNU General Public License for more details.
  23. //
  24. // To read the license please visit http://www.gnu.org/copyleft/gpl.html
  25. // ----------------------------------------------------------------------
  26. // Original Author of file: Francisco Burzi
  27. // Purpose of file:
  28. // ----------------------------------------------------------------------
  29.  
  30. if &#40;stristr('footer.php', $_SERVER['PHP_SELF'])) {
  31.     die &#40;"You can't access this file directly...");
  32. &#125;
  33.  
  34. // XHTML Support by Matt Jarjoura. <mjarjo1@umbc.edu>
  35.  
  36. function footmsg&#40;)
  37. &#123;
  38.    echo "<span class=\"pn-sub\">\n".pnConfigGetVar&#40;'foot1')."<br />\n</span>\n";
  39. &#125;
  40.  
  41. function foot&#40;)
  42. &#123;
  43.     // modification .71 multisites mouzaia
  44.     /* it should not be necessary here, since config.php is in a table.
  45.         if (!isset($index)) {
  46.         include(WHERE_IS_PERSO."config.php");
  47.         }
  48.     */
  49.     themefooter&#40;);
  50.  
  51.     if &#40;!isset($GLOBALS['xanthia_theme']) || !$GLOBALS['xanthia_theme']) {
  52.         // show time to render
  53.         $mtime = explode&#40;" ",microtime());
  54.         $dbg_endtime = $mtime&#91;1] + $mtime[0];
  55.         $dbg_totaltime = &#40;$dbg_endtime - $GLOBALS['dbg_starttime']);
  56.  
  57.         if &#40;$GLOBALS['pndebug']['pagerendertime']) {
  58.             printf&#40;"<div style=\"text-align:center\" class=\"pn-sub\">Page created in %f seconds.</div>", $dbg_totaltime);
  59.         &#125;
  60.         if &#40;$GLOBALS['pndebug']['debug']){
  61.             $GLOBALS&#91;'dbg']->v($dbg_totaltime,"Page created in (seconds)");
  62.             $GLOBALS&#91;'dbg']->v($GLOBALS['debug_sqlcalls'],"Number of SQL Calls");
  63.         &#125;
  64.    
  65.         // include typetool 8.0 [larsneo]
  66.         // (upload option disabled for security reasons)
  67.         $tt_enable = pnModGetVar&#40;'typetool', 'enable');
  68.         $baseURL = pnGetBaseURL&#40;);
  69.         $ModName = pnModGetName&#40;);
  70.         if &#40; is_numeric( $tt_enable ) && $tt_enable == 1) { 
  71.             if &#40;pnSecAuthAction(0, 'typetool::', "$ModName::", ACCESS_COMMENT) &&
  72.                     $ModName != "Settings" &&
  73.                     $ModName != "Permissions" &&
  74.                     $ModName != "Censor"&#41; {
  75.                 // enable the wysiwyg editor when user has at least comment rights
  76.                 // no WYSIWYG in Settings, Permissions and Censor anyway...
  77.                 echo "\n<!--Visual Editor Plug-in-->\n";
  78.                  echo "<script type=\"text/javascript\">VISUAL=0; FULLCTRL=1; SECURE=1; LANGUAGE='".pnModGetVar('typetool', 'language')."';</script>\n";
  79.                  echo "<script type=\"text/javascript\" src='".$baseURL."modules/typetool/pnincludes/quickbuild.js'></script>\n";
  80.                 echo "<!--end Visual Editor Plug-in-->\n";
  81.             &#125;
  82.         &#125;
  83.    
  84.         echo "</body>\n</html>";
  85.         ob_end_flush&#40;);
  86.     &#125;
  87. &#125;
  88. echo $GLOBALS&#91;'dmfooter'];
  89. foot&#40;);
  90. include_once&#40;'includes/pncbotcount.php');
  91. ?>
Top  SpUpUz send PM
 
Chestnut Posted: 17.08.2004, 18:13
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
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 ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
SpUpUz Posted: 17.08.2004, 18:15
Pizzaman
Pizzaman


registered: Apr 25, 2004
Posts: 21

Status:  offline
last visit: 18.08.04
sitll problem after removing from header.php
Top  SpUpUz send PM
 
Chestnut Posted: 17.08.2004, 18:24
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
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 ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
SpUpUz Posted: 17.08.2004, 18:27
Pizzaman
Pizzaman


registered: Apr 25, 2004
Posts: 21

Status:  offline
last visit: 18.08.04
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
Top  SpUpUz send PM
 
Chestnut Posted: 17.08.2004, 18:30
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
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 ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
SpUpUz Posted: 17.08.2004, 18:32
Pizzaman
Pizzaman


registered: Apr 25, 2004
Posts: 21

Status:  offline
last visit: 18.08.04
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
Top  SpUpUz send PM
 
Chestnut Posted: 17.08.2004, 18:38
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
Try this one...

(It's a fast build but should work)...


Chestnut ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
SpUpUz Posted: 17.08.2004, 19:06