On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

In preparation for the release of Simple:Press Version 4.0, the Support Forum has moved to a new site dedicated to the plugin. This will also be the future home for Simple:Press Forum.


Version 3.1.4 will still be available for download here in the short term.


For the support forum - and to visit our new site and to get details of version 4.0, click on the logo to take you to simplepressforum.com

This forum is currently locked - access is read only
Current User: Guest
Please consider registering

 
Search Forums:


 




Activate SimpleForum plugin failed

UserPost

12:08 am
21 Jan 2008


odavid2002

Member

posts 3

1

Hi,

My configuration is :

- Wordpress 2.3.2
- SimpleForum 2.1
- PHP v4.4.3-dev
- MYSQL v5.0.45

As i notice already in this forum, i will be the number 3 (or4) who have the same problem. After uploaded the simple-forum directory under WP/wp-content/plugins/ directory

I try to activate it, and here is the message i get :

Fatal error: Cannot redeclare sf_setup_forum() (previously
declared in
/mnt/140/sdb/7/b/odavid2002/wordpress/wp-content/plugins/simple-forum/sf-control.php:82)
in /mnt/140/sdb/7/b/odavid2002/wordpress/wp-content/plugins/simple-forum/sf-control.php on line 82

I can observe that in MySQL database, 5 tables are created. The SimpleForum page is created, when i browse on it i got the following message :

Fatal error: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /mnt/140/sdb/7/b/odavid2002/wordpress/wp-includes/wp-db.php on line 251

Fatal error: ob_end_flush() [ref.outcontrol]: failed to delete
and flush buffer. No buffer to delete or flush. in /mnt/140/sdb/7/b/odavid2002/wordpress/wp-includes/functions.php on line 1419

Any new idea(s) since last post about this problem !!?? snif ….Cry Wait to read "HELP-comments" soon

PS : I tried 3others forums (without good success), and this one look great, with many funtionnalities and … AND, directly inserted in my theme !!…

10:59 am
21 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

2

As to the initial ‘redeclare’ problem then no, still not further forward on this. I will say to you what I say to the others who have had this… you could help us try and resolve it. Others have not come back so have, I assume, abandoned the attempt.

It would be a help if you could de-activate ALL other plugins to see if SF then runs OK. And then re-introduce each other plugin one at a time.

As to the WP errors you are seeing these are new to me and I wonder of they point to something more significantly wrong with youir environment?

I don’t know if it would help but a link to your site may be useful. 

1:46 pm
21 Jan 2008


odavid2002

Member

posts 3

3

GOOD NEWS !!!!

I (partially…or fully after more testing) figure out it !!!

I notice that in files :

sf-control.php:48 => add_filter(’the_content’, ’sf_setup_forum’);

sf-link.php:12 => add_filter(’the_content’, ’sf_blog_show_link’);

So I modify in "sf-link.php" file by :

add_filter(’the_content_link’, ’sf_blog_show_link’);

 

I restarted the plugin and still have a WARNING message, but i was able to browse/admin the forum !!!

I stopped it again, start all my pulgins, ad start simple-forum plugin …..

No more warning message !!!

 

Wait your comment to approuve or not this "fix?" …

2:25 pm
21 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

4

Well… there is NO filter named ‘the_content_link’ so that change actually breaks functionality.

You seem to suggest that you did de-activate some plugins. This is far more likely to be the reason things now work. It would have been useful to know at what point the forum activated and what other plugin was perhaps causing the conflict.

8:17 am
24 Jan 2008


odavid2002

Member

posts 3

5

So,

I modify back the file sf-link.php, and everything still working fine.

After more testing  maybe the plugin makes a mess is runPHP 2.3.1.

 (i can only say maybe, because when performing twice the same test procedure, i

didn’t get same result !)

Hope it could helps you ..

Bye

9:11 am
24 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

6

Thanks for the information. At least it gives me something to ask people who may have this problem in the future.

It is possible that it may just have something to do with the order in which the plugins are started up. 

5:57 pm
31 Jan 2008


Reimer

Guest

7

I also have the same problem.

I deactivated each plugin which had no effect. Then I uncommented the hook and the function sf_setup_form() to see what happens. Then I got a redeclaration error of sf_localisation. Even if I introduce a new function like sf_I_like_beer() I get the redeclaration error of that new function.

I don’t have great programming skills but I want to find a solution. If anyone has already fixed it, please announce it here.

….. later…..

I’ve broken down that plugin to a very simple structure of a wordpress plugin.

First of all: no function of the included file sf-upgrade.php is executed. The other included files are commented out for testing.
Second: there’s a problem with the function sf_setup_data(). If I rename it I don’t get a fatal error anymore. So what’s going wrong?

Now I don’t know what to do. Please give me instructions :D

10:53 am
1 Feb 2008


Reimer

Member

posts 7

8

No tables are created so what’s wrong with this code (I changed it a little bit for testing):

global $wpdb, $wp_version, $user_ID, $user_identity;

get_currentuserinfo();

//== CREATE THE BASE TABLES

$sql = “
CREATE TABLE IF NOT EXISTS test (
group_id bigint(20) NOT NULL auto_increment,
group_name varchar(50) default NULL,
group_seq int(4) default NULL,
PRIMARY KEY (group_id)
);”;

$wpdb->query($sql);

11:21 am
1 Feb 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

9

And that didn’t get created either eh?

The only times I have heard of the tables not being created via the script it was down to the MySQL version being used. if I recall correctly, versions in the 4.1x family have failed in the past and I do not know why. When users have then taken the ‘create’ script and run it directly aganst the database they have then been created in almost all cases.

Another thing you could try is putting tickmarks around each column name and table name. I have seen that work as well. Also, if you have had on-going problems creating tables you may need to check your access privileges in the database and ensure that the user you have logged in your wp-config.php file has ‘CREATE’ rights. I have come across this as well when a host installs WP for you.

But the bottom line is that your example above looks fine to me and is standard MySQL table creation syntax. As far as I am aware, the tick marks are entirely optional. If you have access to phpMyAdmin you may want to try a manual create to see if you get any errors or success. 

12:42 pm
1 Feb 2008


Reimer

Member

posts 7

10

Thanks for your answer. It’s no access privilege problem and I’ve already written an own small plugin for a very simple member list administration and there I hadn’t any problems.

The code really looks fine and &wpdb is global, so I don’t know what’s wrong but I’ll tell you further details of that problem if I find the cause.

Cu.

PS: MySQL 4.0.1 is running, but the code is fine. Maybe a problem with global $wpdb?

12:58 pm
1 Feb 2008


Reimer

Member

posts 7

11

Ok, I’ve just took a look in my other code and I used

require_once(ABSPATH . ‘wp-admin/upgrade-functions.php’);
dbDelta($sql);

to create my table for a simple member list. I don’t know anymore if I had a problem using $wpdb->query() or not. But there has to be a reason why I didn’t use the query function. I’ll test it now.

1:35 pm
1 Feb 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

12

MySQL 4.0.1 - Have always had problems with anything older than 4.2 but if you manage to solve it you will be a hero!

1:59 pm
1 Feb 2008


Reimer

Member

posts 7

13

In ironical sense?

$wpdb->query() works fine.

One problem caused another problem. The problem I’ve had now, was that the options sfbuild and sfversion were set but no tables were created (which I don’t understand). If I deactivate an activate the plugin again the function sf_setup_base_data() is not executed because the options are set in the database.

Because the base installation wasn’t successful sf_perform_upgrades isn’t successful too.

So what I have to solve is the problem why the tables aren’t created in the first activation process. So step by step…

2:12 pm
1 Feb 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

14

Sorry - if you had said you had deactivated the plugin at any stage I would have mentioned the two option records.

But that also shows that the tables failed but triggered no apparent error - almost as if a success was returned. hence it went on to create the option records etc. 

2:41 pm
1 Feb 2008


Reimer

Member

posts 7

15

The problem of the query

$sql = “
….
PRIMARY KEY (group_id)
) ENGINE=MyISAM “.sf_charset().”;”;

is the part “ENGINE=MyISAM”. Furthermore sf_charset() returns an empty string.

If I remove this from the query, the tables are created. I’ll test the activation process with this modification and I hope to get no redeclaration errors anymore which is maybe caused by that missing tables…

2:54 pm
1 Feb 2008


Reimer

Member

posts 7

16

The tables are created now but I still get a fatal error

Fatal error: Cannot redeclare sf_setup_forum() (previously declared in /…/wp-content/plugins/simple-forum/sf-control.php:101) in /…/wp-content/plugins/simple-forum/sf-control.php on line 101

9:40 am
2 Feb 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

17

Another problem that nobody can explain - not even on the WP Forums. It may have something to do with plugin load sequence. It may have something to do with aother plugin. Some users have overcome it by turning off all their plugins and then reactivating them one by one. One guy reckoned by removing the call the sf_setuo_data() in the sf-control.php file it got it working….

This is a problem that plagues quite a few plugins and plugin authors. Most are cinvinced that there is some core problem fown in th WP code but nobody seems to be able to work out what.

It does seem rather unfortunate that you overcome one problem only to have another and I am sorry to hear it.

By the way, previous versions of SF did not have either the engine or the charset defined in the create table sql and it still sometimes failed on pre-4.2 MySQL. There is more to it than just that it seems.

If you could deactivate plugns testing between each one and then activating them one at a time ahain between tests it would be a help to me as well - it may one of those. I know people have reported problems with one of the contact form plugins as well as one of the plugin ‘manager’ type plugins as well. 

9:59 am
2 Feb 2008


Reimer

Member

posts 7

18

I haven’t said it, but for testing each plugin was deactivated except the anonymous plugin.

Next days I have no time to analyze my problems but I tell you more details then.



Reply to Topic: Activate SimpleForum plugin failed

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 1 + 1        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

7 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 16

Topics: 2068

Posts: 14091

Members:

There are 1003 members

There are 837 guests


Yellow Swordfish has made 5252 posts

Top Posters:

Mr Papa - 1602

-Radio- - 558

ovizii - 114

jfv - 82

angelic007 - 72

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)