500 error when fundraiser is activated

Hey Guys :slight_smile:

I was sorting out a 500 error when I activated marketpress (I was getting a 500 error when trying to enter mainsite.com/wp-admin as well as the network admin menu). I renamed the plugins folder and noticed the error came from the Fundraiser plugin.

Is anyone else having this issue? I'm using the Dynamix theme.

Regards,
Eric

  • ebreuers

    Hey Joe :slight_smile:

    The errors seem to only happen when Marketpress is installed and active (MP is in my mu-plugins directory).

    If I activate Fundraiser (as well as a bunch of others) I get a 500 error immediately after clicking 'activate'. Removing the plugin through ftp immediately resolves the error. The problem is, there are a number of plugins that I'd like to use (Q&A is among this list now) and can't.

    The only plugin from the list that gives me any further grief is Classifieds, which produces a PHP error in the Capabilities.php file on line 684.

    Thanks for your reply, I hope we can get this one figured out!

  • aecnu

    Greetings ebreuers,

    OK well it seems that we have a couple interesting issues here with these combinations.

    Of course you are aware that the instructions for Market Press do not mention having it in the forced always on mu-plugins folder. However, I personally do not have a problem with this but wanted to bring ti to your attention that it is not the recommended installation.

    I guess the simple fix would be making a second site for the other resources, but that would look kind of crummy.

    I believe this would be relative to the way you integrated the sub sites into the main. Look how many different subs Google itself uses for all of its different resources for example.

    From what I have gathered with your descriptions- it appears that something in Market Press is throwing everything else off? Is this your impression too?

    Please advise.

    Cheers, Joe

  • ebreuers

    Thanks Joe :slight_smile:

    Installing Marketpress through ftp and network activating leads to a 500 error on both my network and main site dashboard. I need to have it network activated so I can charge the percentage on my network sales.

    From what I have gathered with your descriptions- it appears that something in Market Press is throwing everything else off? Is this your impression too?

    Yes, that's correct. I've now tried the 'offending plugins' (Q&A, Fundraising, Directory) and I've had no problems or errors with them upon activation when Marketpress isn't Network Activated/Active on main site. Classifieds also works with MP disabled, no PHP errors come up.

    I really need MP and it's chained payments setup as it's a huge value proposition for my site. This is probably an issue with another couple lazy lines of code in my theme... Are there any specific theme files this could be related to?

  • aecnu

    Greetings ebreuers,

    Thank you for the additional feedback and last but not least while i am testing out this anomaly on my production server, what are your hosting error logs saying about this error 500? Anything significant or offering us a clue I wonder?

    Of course this is what the developer will ask if I do not do it ahead of time, so we are not spinning our wheels :slight_smile:

    Please advise and meantime I am going to try to create this error myself and should not be long doing so.

    Cheers, Joe

  • ebreuers

    Hey Joe :slight_smile:

    Thanks for your quick reply!

    The only line I'm seeing in the error log which may apply to this issue is:

    [25-Mar-2012 19:17:33] PHP Warning: Invalid argument supplied for foreach() in /home4/urbanruc/public_html/wp-content/db.php on line 281

    The corresponding line in the db.php file:
    foreach ( $db_servers[$query_data['dataset']] as $server ) {

    ...and the full code snippet that was from:

    // Group eligible servers by R (plus 10,000 if remote)
    		$server_groups = array();
    		foreach ( $db_servers[$query_data['dataset']] as $server ) {
    			 // they don't want us to use this server for this operations
    			if ( $server[$operation] < 1 )
    				continue;

    The offending plugins were activated site by site (and will probably remain that way, offered to supporters only).

    Thanks again!

    Eric

  • aecnu

    Greetings Eric,

    Understood about the site by site activations and absolutely agree that this is the way to go for supporters of course :slight_smile:

    Unfortunately no I have not been able to replicate the errors, this would make things much easier if I could then I could determine if in fact it is the theme or what the hay yeah is going on here.

    However, this brings up an obvious test we should do to see if the errors persist and give us an exact answer to the question is it the theme or not.

    Please consider changing the theme to Twenty Eleven just long enough to activate those plugins that seem to be having a problem and see if we get the server 500 error.

    On a side note - it appears from looking at the server error log you provided that you are running Multi DB? and if so that the theme may be choking on it and possibly not completely MultiSite compatible.

    However, we shall see with our test above using the Twenty Eleven theme test.

    Please advise how it goes.

    Cheers, Joe

  • ebreuers

    Hey Joe :slight_smile:

    So after installing Twenty Eleven and installing/network activating Marketpress I get a new error:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /home4/urbanruc/public_html/wp-includes/widgets.php on line 615

    On a side note - it appears from looking at the server error log you provided that you are running Multi DB? and if so that the theme may be choking on it and possibly not completely MultiSite compatible.

    Yep, I'm running Multi DB (16)... Just out of curiosity, are there any resources on creating/editing my theme to make it Multisite compatible?

    Regards,
    Eric

  • ebreuers

    Line 615 of widgets.php:

    if ( in_array($output_callback, $_wp_deprecated_widgets_callbacks, true) &&

    Full section:

    `$id_base = _get_widget_id_base($id);
    if ( in_array($output_callback, $_wp_deprecated_widgets_callbacks, true) && !is_callable($output_callback) ) {
    if ( isset($wp_registered_widget_controls[$id]) )
    unset($wp_registered_widget_controls[$id]);

    if ( isset($wp_registered_widget_updates[$id_base]) )
    unset($wp_registered_widget_updates[$id_base]);

    return;`

  • aecnu

    Greetings Eric,

    Straight up I am running Multi DB on our production servers and not experiencing any errors.

    I just tried an experiment of network activating Market Press and activating the Fundraiser plugin simultaneously and still unfortunately have no errors. I say unfortunately because it is easier to debug when I can replicate an issue.

    The error you gave above:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /home4/urbanruc/public_html/wp-includes/widgets.php on line 615

    Is an error not related to what you and I are doing but related to the fact that your php process ran out of memory at around 64 megabytes where on our servers we have it set at 512 megabytes and therefore we may have just discovered your problem that there may not be enough memory being allocated to do the job as we want.

    It should be at least 128 megabytes and to prove our settings:
    http://fab-host.com/phpinfo.php

    see memory_limit = 512 mb

    Therefore the first and foremost goal here is to at least double the available ram to php to 128 mb's minimum.

    This may be done by you if your hosting allows php.ini files to be run within your web root or if you have a dedicated server you can change it yourself.

    I have attached a file which you can upload and then call up in your browser to see what these setting are.

    Please advise.

    Cheers, Joe

  • ebreuers

    Ok, for the purposes of debugging this issue... and narrowing down the true culprit. I've uninstalled Multi DB (Don't need it right now) and increased PHP memory_limit to 128MB.

    After re-installing and network activating Marketpress... BLAMMO! We've got life!

    So far every plugin that was causing the error co-exists peacefully :slight_smile: Now I can finally put the finishing touches on this beast and launch in Beta mode.

    I really appreciate your assistance with this issue Joe. I know how difficult it is to resolve issues from across the globe and you guys continue to take weight off of my shoulders!

    I'll be a WPMUdev member for life! :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.