Fatal error

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Fatal error
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
For some reason I am getting this error message on the bottom of my site:

Fatal error: Cannot redeclare head() (previously declared in /home/echo69/public_html/header.php:31) in /home/echo69/public_html/header.php on line 30

I don't think I messed with the header file at all. I did alter the footer and my_header in the "includes" folder, could that be it? thank you ,
echo



Back to top Reply with quote
#2   re: Fatal error
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
This problem is usually caused by your cookies or the board cookies. Try deleting them and setting the board to nothing in the cookies prefarances.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   Re: re: Fatal error
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   


Originally posted by Telli @ Tue Apr 27, 2004 9:51 am:

This problem is usually caused by your cookies or the board cookies. Try deleting them and setting the board to nothing in the cookies prefarances.

Telli, I deleted all my cookies, how and where do I set the boards cookie preferences to nothing? I looked in the forums admin section but see nothing in regards to a setting of "nothing". Thanks,
echo



Back to top Reply with quote
#4   re: Fatal error
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   


I don't think I messed with the header file at all. I did alter the footer and my_header in the "includes" folder, could that be it? thank you ,
echo


Sorry i didnt see that what did you add to the footer? Thats where the error is. Maybe something that using the includes("header.php"); calling it a second time.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: Fatal error
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
I added a code for my preloader in the footer. The first one is my default footer, the second is the code added and the third is what I have now...notice there is a difference in the footers (die) code? I added some spaces to post here.

<?p h p

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 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("footer.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

$footer = 1;

function foot msg() {
    global $foot1, $foot2, $foot3, $copyright, $total_time, $start_time;
    $mtime = microtime();
    $mtime = explode(" ",$mtime);
    $mtime = $mtime[1] + $mtime[0];
    $end_time = $mtime;
    $total_time = ($end_time - $start_time);
    $total_time = ""._PAGEGENERATION." ".substr($total_time,0,5)." "._SECONDS."";
    echo "<font class=\"footmsg\">\n";
    if ($foot1 != "") {
   echo "$foot1<br>\n";
    }
    if ($foot2 != "") {
   echo "$foot2<br>\n";
    }
    if ($foot3 != "") {
   echo "$foot3<br>\n";
    }
    // DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
    // IF YOU REALLY NEED TO REMOVE IT AND HAVE MY WRITTEN AUTHORIZATION CHECK: http://phpnuke.org/modules.php?name=Commercial_License
    // PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE!
    echo "$copyright<br>$total_time<br>\n</font>\n";
}

function f oot() {
    global $prefix, $user_prefix, $db, $index, $user, $cookie, $storynum, $user, $cookie, $Default_Theme, $foot1, $foot2, $foot3, $foot4, $home, $module, $name;
    if ($home == 1) {
   blocks(Down);
    }
    if ($module == 1 AND file_exists("modules/$name/copyright.php")) {
   $cpname = ereg_replace("_", " ", $name);
   echo "<div align=\"right\"><a href=\"javascript:openwindow()\">$cpname &copy;</a></div>";
    }
    themefooter();
    echo "</body>\n"
   ."</html>";
    die ();
}

foot   ();

?>


/////
//////ADD this section in footer.php - after themefooter ();
/////


echo " <SC R IPT language=javascript> <!--
   ap_showWaitMessage('waitDiv', 0);
   //--> </SCR IPT> </body>\n </html>"; 

}

foot ();


<?p h p

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 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("footer.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

$ footer = 1;

function footmsg() {
    global $foot1, $foot2, $foot3, $copyright, $total_time, $start_time;
    $mtime = microtime();
    $mtime = explode(" ",$mtime);
    $mtime = $mtime[1] + $mtime[0];
    $end_time = $mtime;
    $total_time = ($end_time - $start_time);
    $total_time = ""._PAGEGENERATION." ".substr($total_time,0,5)." "._SECONDS."";
    echo "<font class=\"footmsg\">\n";
    if ($foot1 != "") {
   echo "$foot1<br>\n";
    }
    if ($foot2 != "") {
   echo "$foot2<br>\n";
    }
    if ($foot3 != "") {
   echo "$foot3<br>\n";
    }
    // DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
    echo "$copyright<br>$total_time<br>\n</font>\n";
}

function foot () {
    global $prefix, $user_prefix, $db, $index, $user, $cookie, $storynum, $user, $cookie, $Default_Theme, $foot1, $foot2, $foot3, $foot4, $home, $module, $name;
    if ($home == 1) {
   blocks(Down);
    }
    if ($module == 1 AND file_exists("modules/$name/copyright.php")) {
   $cpname = ereg_replace("_", " ", $name);
   echo "<div align=\"right\"><a href=\"javascript:openwindow()\">$cpname &copy;</a></div>";
    }
    themefooter();
    echo " <SC R IP T language=javascript> <!--
   ap_showWaitMessage('waitDiv', 0);
   //--> </SC RI PT> </body>\n </html>"; 
}

foot ();

?>


I am doing something wrong here, is it because I am using Nuke 7.2? Thank you for the help Telli,
echo


Back to top Reply with quote
#6   re: Fatal error
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Just add the script right below this line before the closing brace.

echo "$copyright<br>$total_time<br>\n</font>\n";
echo " <SC R IP T language=javascript> <!--
   ap_showWaitMessage('waitDiv', 0);
   //--> </SC RI PT>";


Remove the </body></html> its being added by the theme footer.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: Fatal error
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
You the man Telli icon_biggrin.gif Thank you very much, it worked perfectly.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum