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
Christopher Downey
Member
Free Members
sp_UserOfflineSmall Offline
Mar 11, 2013 - 10:26 pm

Mr Papa said
right but I wanted to know exactly what you entered for an IP and in which input area... I want to try it locally with your exact input...

after you load the admin, before you add an IP, can you look at the db and make sure it still has the a:0{}

I've tried a bunch of IPs from the spam in the forum. I place them in the "Add IP Ban" section. I even tried the example IP it gives 123.456.34.55.

The db still has the a:0{} in it, but for some reason, it doesn't stick. The problem doesn't only happen when I change from "Array" it happens upon activation which is the main concern. I shouldn't have to go into my SQL and change the table. The minute I activate the plugin I get the errors and they even appear in the header on my forum page. For some reason there is a glitch with the Ban only on IPs in the plug-in on this installation.

 

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

and for the life of me, I dont know why...  as you say, its unique so far to your install... would like to understand why, which is one reason I asked for php and mysql versions on your server...

agree, on activation, it should be storing a serialization of array(), which would be a:0{}... for some reason, it seems to be skipping the serialization...  and its even odder when you store the saved IP, it reverts to an array...  an array is being saved, but again its serialized...

can you tell me what you have in the sfoptions table for an option_name of 'ban'?

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

can you perhaps try dowloading the plugin again and re uploading it?  perhaps there is some corruption in it...

Avatar
Christopher Downey
Member
Free Members
sp_UserOfflineSmall Offline
Mar 11, 2013 - 10:46 pm

Mr Papa said
and for the life of me, I dont know why...  as you say, its unique so far to your install... would like to understand why, which is one reason I asked for php and mysql versions on your server...

agree, on activation, it should be storing a serialization of array(), which would be a:0{}... for some reason, it seems to be skipping the serialization...  and its even odder when you store the saved IP, it reverts to an array...  an array is being saved, but again its serialized...

can you tell me what you have in the sfoptions table for an option_name of 'ban'?

Under option_name of 'ban' is:

a:5:{s:15:"general-message";s:36:"You have been banned from this forum";s:12:"user-message";s:36:"You have been banned from this forum";s:10:"ug-message";s:79:"Your account has been temporarily restricted and moved to a different usergroup";s:15:"restore-message";s:55:"Your ban has expired and your account has been restored";s:9:"dbversion";i:0;}

 

Avatar
Christopher Downey
Member
Free Members
sp_UserOfflineSmall Offline
Mar 11, 2013 - 10:56 pm

Mr Papa said
can you perhaps try dowloading the plugin again and re uploading it?  perhaps there is some corruption in it...

No good on this option. Tried it before. Just tried it again on a different computer even and it didn't help.

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 11, 2013 - 11:09 pm

so... up to a small code change to try something out?  shot in the dark, but need to try to force the serialization...

in sp-ban-install.php, find these four lines:

        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);

and change them to:

        sp_add_option('banned_ips', serialize($init));
        sp_add_option('banned_ip_ranges', serialize($init));
        sp_add_option('banned_hostnames', serialize($init));
        sp_add_option('banned_agents', serialize($init));

can try forcing a serialize though the sp_add_option() does that itself...  then uninstall and try another activation...

again on your db, can you take a look in phpmyadmin your db structure...  can you tell me the type (MyISAM, INNODB) and what the collation is on the wp and sp tables?

 

Avatar
Christopher Downey
Member
Free Members
sp_UserOfflineSmall Offline
Mar 11, 2013 - 11:28 pm

-------- Original message --------
From: "Simple:Press Support"
Date:
To: admin@americanmusclehunks.com
Subject: Forum Post - Simple:Press: [Ban having errors upon activation]

I'll do the code change in the morning. Just to be clear though, you want to attempt the code change then uninstall the plugin? Complete uninstall or just deactivate/reactivate. I assume the latter as complete would erase the code change? 

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

yes, complete uninstall of the admin bar plugin... like you said you had done before... then reactivate it and see if the code changes do anything... that wont affect code changes at all... just data in the db...

and see if you can answer the db questions... thanks!

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

yes, complete uninstall of the admin bar plugin... like you said you had done before... then reactivate it and see if the code changes do anything... that wont affect code changes at all... just data in the db...

and see if you can answer the db questions... thanks!

Avatar
Christopher Downey
Member
Free Members
sp_UserOfflineSmall Offline
Mar 12, 2013 - 8:47 am

Mr Papa said
so... up to a small code change to try something out?  shot in the dark, but need to try to force the serialization...

in sp-ban-install.php, find these four lines:

        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);

and change them to:

        sp_add_option('banned_ips', serialize($init));
        sp_add_option('banned_ip_ranges', serialize($init));
        sp_add_option('banned_hostnames', serialize($init));
        sp_add_option('banned_agents', serialize($init));

can try forcing a serialize though the sp_add_option() does that itself...  then uninstall and try another activation...

again on your db, can you take a look in phpmyadmin your db structure...  can you tell me the type (MyISAM, INNODB) and what the collation is on the wp and sp tables?

 

This code does not even exist in sp-ban-install.php

 

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