Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: hamsterdaddy - elokuu 10, 2011, 11:56:17 IP

Otsikko: Crucial question about overwriting the managepermissions.php file in 1.1.14
Kirjoitti: hamsterdaddy - elokuu 10, 2011, 11:56:17 IP
First, the permissions are broken in ADMIN at my site, happened a while back. I can't change the permissions of my members, heck, half the "check"boxes are not even visible anymore.

Here's the question:

I uploaded a new load of 1.1.14. I extracted the files. There is just one single file, "source/managepermissions.php". I have it ready to overwrite the one in the server.

BUT... There are two files inside the software inside the server, and both look the same at a casual glance.

But one shows up as script, and one shows up as text. (almost the same byte size)

So which one do I overwrite, or do I overwrite both?

I really need to fix my permissions. Thanks in advance.

Otsikko: Re: Crucial question about overwriting the managepermissions.php file in 1.1.14
Kirjoitti: Sir Osis of Liver - elokuu 11, 2011, 12:29:56 AP
There is only one /Sources/ManagePermissions.php.  Not sure what you're seeing - you can't have two files with the same filename.  You'll also need to upload a clean ManagePermissions.template.php to /Themes/default/.

Otsikko: Re: Crucial question about overwriting the managepermissions.php file in 1.1.14
Kirjoitti: hamsterdaddy - elokuu 11, 2011, 02:27:03 AP
Krash, you said:

LainaaThere is only one /Sources/ManagePermissions.php.  Not sure what you're seeing - you can't have two files with the same filename.

Sorry, it's not that simple. There are in fact two of them inside the sources folder, one above the other one. One has a squiggle at the end, it's the text one. There is a slight difference in file size. Like I said, one is labeled script, and one text.

Before I show you the screen shot, let me point out that there are duplicates for I think 5 other names. "managesearch.php", "managesmileys.php", "manageserver.php" etc. All have a script & text version.

Screen shot:

http://i960.photobucket.com/albums/ae89/GuiltyPuppy/Source-MP-PHP-1.png

Sorry, the picture's not that clear; never did this before.

Now, this is why I was looking to overwrite the source/mangepermissions.php file: If I even click on Manage Permissions there are 16 sets of errors that are generated that look like this, all showing a "sources" path:

8: Undefined index: permissionname_topic_any
File: /home/content/m/a/g/magyver/html/forum/Sources/ManagePermissions.php
Line: 1478

8: Undefined index: permissionname_topic_own
File: /home/content/m/a/g/magyver/html/forum/Sources/ManagePermissions.php
Line: 1474

However, once inside Manage Permissions, if I click on a membergroup, 4 more sets of errors are generated like this, with a "themes" path:

2: Invalid argument supplied for foreach()
File: /home/content/m/a/g/magyver/html/forum/Themes/default/ManagePermissions.template.php
Line: 254

8: Undefined index: columns
File: /home/content/m/a/g/magyver/html/forum/Themes/default/ManagePermissions.template.php
Line: 254

8: Undefined index: id
File: /home/content/m/a/g/magyver/html/forum/Themes/default/ManagePermissions.template.php
Line: 249

2: Invalid argument supplied for foreach()
File: /home/content/m/a/g/magyver/html/forum/Sources/ManagePermissions.php
Line: 821

Ok, going on, remember I'm a newbie at this de-bug stuff. You said:

LainaaYou'll also need to upload a clean ManagePermissions.template.php to /Themes/default/.

Ok, I found that file; I can try that, But I don 't use the default theme, I use BlackRain v2.

I hope that doesn't matter. I do appreciate the help.

Otsikko: Re: Crucial question about overwriting the managepermissions.php file in 1.1.14
Kirjoitti: Sir Osis of Liver - elokuu 11, 2011, 03:20:52 IP
The duplicate files with ~ at the end are created as backups by the package manager when you install a mod, which edits those files and creates a new one.  If you have mods installed, uninstall them, then upload clean files.  If you delete or overwrite files that have been changed by a mod, you can create new problems if that mod is still installed.


BlackRainV2 uses the default ManagePermissions files.

Otsikko: Re: Crucial question about overwriting the managepermissions.php file in 1.1.14
Kirjoitti: hamsterdaddy - elokuu 11, 2011, 05:48:45 IP
Thanks Krash. A mod backup file would explain the extra ones. So far I have only overwritten 1, the manage permissions in Themes/Default.

It didn't help. I better slow down, and go back and assess the situation for now, before continuing.

It's not helping that I have two teeth badly abscessed, and am on antibiotics (& Demerol) because the infection got in my blood. It's hard to concentrate, have been off work a few days.

Let me know how many files you think I need to overwrite, I need to have them extracted, ready to go, uninstall the mods, and do it all at one time, then reinstall the mods after testing to see if permissions are fixed.

So far it looks like:
* ManagePermissions.template.php to /Themes/default/.
* ManagePermissions.php to Sources

Anything else? ...... Also, do I need to delete those backup permissions files?    (I'm guessing the software is ignoring them, and they will get overwritten again when the mods are re-installed)

Krash, I'll go back above & edit out the unnecessary, & update to what I did so far. I'll hold off until I hear back on if there are any other permissions files that should be overwritten as well.

Thanks for your patience.
Otsikko: Re: Crucial question about overwriting the managepermissions.php file in 1.1.14
Kirjoitti: Sir Osis of Liver - elokuu 11, 2011, 10:39:51 IP

Just upload the two files - that should fix the permissions problem.  If it doesn't, it eliminates the obvious, and you should get some helpful errors in your errorlog.  The backup files are ignored, and will be overwritten when you reinstall the mods.  Once you get permissions working, install the mods one at a time, and check permissions after each install to see if it's affected.  If one of the mods caused the problem, you'll need to know which one.  Make sure the mod versions are compatible with your forum version.

Otsikko: Re: Crucial question about overwriting the managepermissions.php file in 1.1.14
Kirjoitti: hamsterdaddy - elokuu 12, 2011, 03:10:34 IP
Sounds great Krash, thanks. I picked a bad time to be uninstalling mods on an NFL football fan site, we had our first games last night, and more tonight, LOL...

Two important things I forgot:

I don't use a default theme, I use Black Rain v2....... Must I uninstall it too?

And I use a Simple Portal home page, can I leave it alone?
Otsikko: Re: Crucial question about overwriting the managepermissions.php file in 1.1.14
Kirjoitti: Sir Osis of Liver - elokuu 12, 2011, 03:16:49 IP

If the problem is confined to the two files, you shouldn't have to worry about the theme or portal.