not sure how you can get the same error message… if you changed the values for those four fields in the db, they wont be arrays… are you sure the changes actually took?
Support Forum
Mr Papa said
not sure how you can get the same error message… if you changed the values for those four fields in the db, they wont be arrays… are you sure the changes actually took?
I don’t know either, that’s the issue.
They take, but then the minute I put an IP in the Add IP Ban box it resets them all to “Array”.
so you made the change in the db and went to the admin page, and it worked? ie no errors?
can you tell me exactly what you entered and in which input field? will allow me to test locally…
Mr Papa said
so you made the change in the db and went to the admin page, and it worked? ie no errors?can you tell me exactly what you entered and in which input field? will allow me to test locally…
In my SQL database I changed banned_ips, banned_ip_ranges, banned_hostnames & banned_agents under table wp_sfoptions from “Array” to a:0:{}
There were no errors. Even the errors on the SS I posted were no there. Then, under Users “Add Ban” I added an IP, clicked “Update Bans” and the errors on the SS I posted reappeared. I went back to check the database and those option_name fields had changed their option_value back to “Array”.
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{}
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.
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’?
can you perhaps try dowloading the plugin again and re uploading it? perhaps there is some corruption in it…
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;}
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.
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?
——– 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?
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!
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!
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