News:

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

Main Menu

Mod Installation Crashed My 2.02 Forum

Started by hawkman, February 24, 2013, 11:31:08 PM

Previous topic - Next topic

hawkman

I was installing "Guest Registration Notification" from http://custom.simplemachines.org/mods/index.php?mod=2607

I did a download from the package manager then during the install it said redirecting to this mods configuration settings

followed by this:

Fatal error: Cannot redeclare integratemodifymodificationsgrn() (previously declared in /home/peyronie/public_html/forum/Sources/Subs.php:4390) in /home/peyronie/public_html/forum/Sources/Subs.php on line 4540


Unfortunately I am pretty ignorant as an administrator of a medical support site and have no clue what to do to get back in or fix my site.  I used to be a charter member here but that looks like it is no longer the case.

Thanks for any help many people depend on this site.

Hawk
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

Kindred

First... Did you take a backup, before?
If not... Remember to do so next time.

Second, you have apparently I stalled the mod twice. The only way to fix this, without a backup is to manually remove the duplicated code.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hawkman

#2
Thanks for your response Kindred.

I did make a full compressed backup from the SMF admin section.  Since I cannot get into my forum I am too dumb to know how to restore it however. I can get into Cpanel

And i am pretty sure I only installed the mod once and it happened during the one install .
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

Kindred

First, don't use the backup from SMF admin. that is problematic...

Second , the backup only takes a backup of the database... Your problem is n the files.

Third... Whether you think you did or not, you did do a double install. That is the only way to get that error.

Given point 2, you are one to have to manually edit the subs.php file to remove the duplicated code near the end of that file. There is als a chance that there s other code which got duplicated in other files...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hawkman

#4
Well, I guess I screwed up then by somehow installing it twice and making a poor back-up on top of that.

Now I have no choice but to figure out how to fix it.  I don't know enough about php to know what code I am looking for.  I guess if I figure out how to best get in to edit the file I will look for duplicate code ???  Any guess on how many lines of code?  I do not want to destroy this forum.

Is this the file you meant  ->   (/public_html/forum/subscriptions.php) when you said subs.php
Sorry I know so little.  My main guy vanished while taking a long trip.  Not sure if he is even alive at this point.

Thank You for the help.
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

Chalky

No, subs.php is in the Sources folder.

If you go to the page where you downloaded the mod on the mod site, you will see top right that you can select your version of SMF and then press the parse button.  This will tell you exactly what code the mod added and therefore which code is likely to be duplicated.  Then you can find this code in your file easily with the search function on your text editor and check how many times the code is there :)

hawkman

Thank you so much Chalkcat. I am off to see if I can resolve this using Filezilla and your tips.  I had a great admin that disappeared one day a few months back and I have not had to do anything like this in years. 

After this is resolved my next quest will be learning how to thoroughly backup without using SMF Admin function but that is another issue for later.

Thanks

Hawk
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

hawkman

#7
1. Poking around I found the following backup file that must be some type of automatic backup.  /public_html/forum/Packages/backups/2013-02-24_before_GuestRegistrationNotification_v1.tar.gz  Is this of any value to me in resolving this issue?  If so how do I use it. 

2. I also found a sources/subs.php~ with a date and time right before I tried to install this mod.  I am thinking this is a rename of the file right before the mod wrote to the file and maybe I can just rename that file to sources.php


I don't know much but believe me, I know how stupid these questions must sound to most of you.

Thanks

Hawk
PS: In the mean-time I am off to see if I can follow ChalkCat's instructions
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

Kindred

yes, the mod system does create a backup of the file... you can try restoring subs.php~ to be subs.php
(sorry, I completely forgot about the php~ files)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hawkman

Kindred, don't apologize.  You and everyone here are a great help.  It worked  :)

When you have no clue what you are doing this stuff gets stressful.  Thanks for all the help.  Now I am going to look for how to properly backup and I may post if I don't find anything that makes sense to me.

Hawk
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

hawkman

OK, I renamed the following ~ files:
./Sources/ManageSettings.php
./Sources/Subs.php
./Themes/default/languages/Modifications.english.php
./Themes/default/languages/Help.english.php

Everything I click on the forum seems to be working fine.  My concern is that the "Guest Registration Notification" shows "Installed".  I am afraid if I try to uninstall it that it will crash the forum since I renamed and am now using the ~ files.

Any ideas on how I clean this mess up before I do a backup?

Thanks.
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

Kindred

Best backup is done through your CPanel.  Backup files and databases
(files are what tells the system HOW to display your site (display, layout), database is what tells your system WHAT to display (user, posts, etc))


If you restored the files, then you SHOULD be able to uninstall the mod (it will tell you that every files is an error when you do so - but since you manually undid the code changes, that is OK)

Alternatively,
Are you planning to try the mod again?
If no to this, then just delete the mod...

Do you have any other mods?
if no to this, then go into your database and use TRUNCATE on the log_packages_installed table
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hawkman

Can I follow this to go back to where I was before the mod? http://www.simplemachines.org/community/index.php?topic=400356.msg2782585#msg2782585

Or is that problematic too like the backup from the forum admin panel?
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

Kindred

actually, by renaming the php~ files, you have essentially already done what that post is telling you to do.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: