News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Please help! Fatal error: Cannot redeclare, Load.php troubles!

Started by XaiXo, September 06, 2010, 03:04:13 PM

Previous topic - Next topic

XaiXo

Hey everyone, could any of you help me or give me some advice on what to do please?

I'm running SMF 2.0 RC1.2, and after a total wreck of an update to RC3 (long story, point being I'm back on RC1.2), I lost Fustrate/JBlaze's award system. After JBlaze helped out, the award system is back up and working, but now none of the profile pages are viewable - This error occurs:

Fatal error: Cannot redeclare template_awards_list() (previously declared in /home/zombiepi/public_html/forum/Sources/Load.php(2067) : eval()'d code:5629) in /home/zombiepi/public_html/forum/Sources/Load.php(2067) : eval()'d code on line 5753

I deleted 2 duplicates within Profile.template.php, but that hasn't changed it as far as I've seen. I've checked Load.php, but I don't know enough about PHP to know what I'm looking for. Here's some of the code:

// Are we going to use eval?
   if (empty($modSettings['disableTemplateEval']))
   {
      $file_found = file_exists($filename) && eval('?' . '>' . rtrim(file_get_contents($filename))) !== false;
      $settings['current_include_filename'] = $filename;
   }
   else
   {
      $file_found = file_exists($filename);

      if ($once && $file_found)
         require_once($filename);
      elseif ($file_found)
         require($filename);
   }


I've highlighted line 2067 in red.


So, can you guys help me? I certainly hope so!

Thanks in advance!

sAce

How exactly did you downgrade ? it seems you have same mod edits in two places, search for duplicate codes

XaiXo

Good question!

As far as I recall, I removed all SMF 2 RC3 stuff and reinstalled RC1.2, then used the database backup. Everything but the mods was back to normal. I reinstalled all of the mods with no issues, aside from the awards one, which said it failed on one of the tests. When installed, the award menu link in the Admin panel didn't show up, as well as none of the award's images being available. JBlaze fixed that issues, and I re-uploaded the images. Sadly, since the fix, profiles haven't been working. Everything else works fine.


Where should I search for the duplicate code? I've removed the template_awards_list() function in the Profile.template.php as instructed (there were 3 of them, deleted the 2 duplicates), and it doesn't exist in Load.php.

sAce

Compare all the edits related to this mod, make sure all of them are correct.

i dont know why you downgraded, but i recommend upgrading !

XaiXo

Quote from: S-Ace on September 06, 2010, 03:44:47 PM
Compare all the edits related to this mod, make sure all of them are correct.

i dont know why you downgraded, but i recommend upgrading !

What would I compare them with?

I downgraded because of two main reasons - One being the current theme, which isn't compatible with RC3, and I didn't really want to change it. The other is that the upgrade didn't work properly, resulting in the entire forum screwing up and requiring a backup and downgrade to be used.

sAce


XaiXo

Any idea where I can get that? The 2.1.7 version is no longer available. :(

sAce

Sorry on that, you should be able to find that package in your packages folder

XaiXo

I can't find it in the packages directory (the manual install instructions) - Both in FTP and on the Admin panel.

dabears

I would just upload clean sources and theme files and re-apply your mods again. That would probably be quicker in the long run than trouble shooting various files.


XaiXo



Advertisement: