Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Ban having errors upon activation
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 12, 2013 - 8:53 am

well, that is why I was worried about corrupted file or version...  here is the complete contents of v1.0.2 sp-ban-install.php

<?php
/*
Simple:Press
Ban plugin install/upgrade routine
$LastChangedDate: 2013-02-17 12:52:14 -0700 (Sun, 17 Feb 2013) $
$Rev: 9854 $
*/

if (preg_match('#'.basename(__FILE__).'#', $_SERVER['PHP_SELF'])) die('Access denied - you cannot directly call this file');

function sp_ban_do_install() {
    $options = sp_get_option('ban');
    if (empty($options)) {
        $init = array();
        sp_add_option('banned_ips', $init);
        sp_add_option('banned_ip_ranges', $init);
        sp_add_option('banned_hostnames', $init);
        sp_add_option('banned_agents', $init);
        sp_add_option('banned_users', $init);

        $options['general-message'] = __('You have been banned from this forum', 'sp-ban');
        $options['user-message'] = __('You have been banned from this forum', 'sp-ban');
        $options['ug-message'] = __('Your account has been temporarily restricted and moved to a different usergroup', 'sp-ban');
        $options['restore-message'] = __('Your ban has expired and your account has been restored', 'sp-ban');
        $options['dbversion'] = SPBANDBVERSION;
        sp_update_option('ban', $options);
    }

    # make sure permalink include pm stuff
    sp_update_permalink(true);
}

# sp reactivated.
function sp_ban_do_sp_activate() {
}

# permissions reset
function sp_ban_do_reset_permissions() {
}

?>

that code is definitely in there...  I just downloaded from our plugins download page and verified its in that archive too...

Avatar
Christopher Downey
Member
Free Members
sp_UserOfflineSmall Offline
Mar 12, 2013 - 9:24 am

Oh never mind, I found it. I was looking for the info in the error message: /sp-resources/forum-plugins/ban/admin/sp-ban-admin.php on line 39, 57,47 & 65 but the one you said was different. Anyway I found it, changed the info, it did nothing after deactivation, etc.

The table info is MyISAM, utf8_general_ci

Any other ideas?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 12, 2013 - 9:32 am

deactivation?  you did an uninstall of the ban plugin?  and the activated?  and still get array in the db options?

this is just downright strange...  and at this point, still limited to just you...

guess you could try editing sp-ban-admin.php... and try changing

                $bans = implode("\n", sp_get_option('banned_ips'));

to

                $bans = implode("\n", (array) sp_get_option('banned_ips'));

to force an array coming out of db... but that will likely just cover up the error and not let it work...

db table info is fine...

about the only other thing I can suggest at this point, is to see if you want to give me ftp access to throw up some debug code, look at some data and see if I can figure out what is going on...  might be here a while doing it in posts...  would only need ftp access to the forum plugins...  if that works, you could send it to me and yellow swordfish via PM being sure to link to this topic so we know what it is about...  if not, understand...  I do have to run out this morning so would be in the afternoon when I could try a few things...

Avatar
Christopher Downey
Member
Free Members
sp_UserOfflineSmall Offline
Mar 12, 2013 - 9:43 am

I'll PM you ftp access. I can't keep going back and forth, this took up my entire day yesterday trying to figure this out. Sending PM now. Let me know if you have any questions.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 12, 2013 - 10:19 am

got it...

Avatar
Christopher Downey
Member
Free Members
sp_UserOfflineSmall Offline
Mar 12, 2013 - 10:25 am

Mr Papa said
got it...

Ok, I'll be around most of the day if you have any questions.

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 12, 2013 - 10:47 pm

should be working now...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625