Help installed a mod cant login to admin section!

Started by imnotron, August 31, 2010, 11:49:44 AM

Previous topic - Next topic

imnotron

i installed a mod - Custom <head> and <body> scripts  - into my site, and then  when i go to click on admin  i get this error
 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/a5059386/public_html/Forum/Sources/Admin.php on line 242



How would  get rid of this mod  i just installed ? the forum works i just cant get into the admin section now  :-(

kat

Hi, imnotron and welcome!

Can you attach that file (Admin.php) to your next post, please?

We can check it out, then. :)

chilly

IIRC the forum creates backup files before install. (subfolder of packages folder)

Language Coordinator

kat



imnotron

Quote from: chilly on August 31, 2010, 12:31:07 PM
IIRC the forum creates backup files before install. (subfolder of packages folder)

I looked, i tried to download the file, says corrupted unknown or damaged ( to the backup package before the mod install )

kat

Er... yeah. There's all this crap, where it ought not be:

// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
// 'shout' => array($txt['shout']),
// Note the comma!! The setting with automatically appear with the first mod to be added.

                        'customhead_body' => array ($txt['customhead_body_settings_menu'])

'addthis' => array($txt['addthis']),


It's about now that we usually ask whether you backed-up, before adding mods, and we get the answer "No"... :(

imnotron

Quote from: K@ on August 31, 2010, 12:42:01 PM
Er... yeah. There's all this crap, where it ought not be:

// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
// 'shout' => array($txt['shout']),
// Note the comma!! The setting with automatically appear with the first mod to be added.

                        'customhead_body' => array ($txt['customhead_body_settings_menu'])

'addthis' => array($txt['addthis']),


It's about now that we usually ask whether you backed-up, before adding mods, and we get the answer "No"... :(


So how do i Fix ? im not sure i understand you lol   ( no back up :( )

kat

Crucial question:

Was that the VERY last mod that you installed?

imnotron

Yes, It will not let me go into admin panel to uninstall it  Considering it will not let me do that, forum seems to work fine though

imnotron

Quote from: K@ on August 31, 2010, 12:51:00 PM
Crucial question:

Was that the VERY last mod that you installed?


Ok, So I Did tiral and error  I deleted that code   - What you said was not suppose to be there - And uploaded the file replaced the admin.php file . and i was able to log into admin section - went into the packages  uninstalled that mod - Only issue it said that replacing admin.php test failed .  but everything else passed and i hit uninstalled - seems to  be working ..



Would there be any issues down the road from doing  this

kat

I just typed all this out and you've buggered me. ;) Read the last two lines.

* K@ decides never to post, if it means lots of typing. ;)

To uninstall, effectively, that mod, so that you can access Admin, you can do this:

Inside your Packages directory, you'll find another named "backups". (SMF can't make proper backups, like you can (AND SHOULD!)), but it does it's best.

In there, you'll find an archive which is named something like 2010-31-08_before_custom_head_1-1.tar (It'll have the name of the mod in the filename)

If you download that, dearchive it and upload everything to your site, overwriting what's there, now, you'll be back as you were, before you installed that mod.

Looks like you've tried to install two mods and one's screwed with the code of the other.

You could try removing those spurious lines that I mentioned, of course.

I have a feeling, though, that that might screw the other mod.

imnotron

Quote from: K@ on August 31, 2010, 02:41:23 PM
I just typed all this out and you've buggered me. ;) Read the last two lines.

* K@ decides never to post, if it means lots of typing. ;)

To uninstall, effectively, that mod, so that you can access Admin, you can do this:

Inside your Packages directory, you'll find another named "backups". (SMF can't make proper backups, like you can (AND SHOULD!)), but it does it's best.

In there, you'll find an archive which is named something like 2010-31-08_before_custom_head_1-1.tar (It'll have the name of the mod in the filename)

If you download that, dearchive it and upload everything to your site, overwriting what's there, now, you'll be back as you were, before you installed that mod.

Looks like you've tried to install two mods and one's screwed with the code of the other.

You could try removing those spurious lines that I mentioned, of course.

I have a feeling, though, that that might screw the other mod.


lol, typings easy , and ok, Well inregards to the backup_custom_ whatever it's called. I downloaded the file and try to dearche it , and there was nothing in it :-( ( also gave unknown or corruputed file

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

kat

Oh, ******! Now Xen's done it!



Quote from: imnotron on August 31, 2010, 02:50:50 PMlol, typings easy

Not when you suffer from tenosynovitis... :(

Empty?

Sure you dearchived both the gz archive AND the tar archive?

imnotron


imnotron

Quote from: K@ on August 31, 2010, 03:10:26 PM
Oh, ******! Now Xen's done it!



Quote from: imnotron on August 31, 2010, 02:50:50 PMlol, typings easy

Not when you suffer from tenosynovitis... :(

Empty?

Sure you dearchived both the gz archive AND the tar archive?

Yes i sleceted the backup  before the install of the mod - and it showed empty or courrupeted  file size on server is 1.6kb  but downloaded said  corrupted etc. so

xenovanis

I found a missing comma.  ;)


'customhead_body' => array ($txt['customhead_body_settings_menu'])


should be

'customhead_body' => array ($txt['customhead_body_settings_menu']),


Can you post a link to the mod you installed?

Quote from: K@ on August 31, 2010, 03:10:26 PM
Oh, ******! Now Xen's done it!



What did I do now? Stop blaming me!  :P
"Insanity: doing the same thing over and over again and expecting different results."

kat

How entirely odd...

Oh, well. At least everything's OK, now.

Ta, Xen!


Remember to back-up, next time, woncha, imnotron? ;)

imnotron

I already uninstalled the mod before i tried your admin.php !  :o -  So would it be safe to install that mod since u mad changes to it?

Advertisement: