Support

Home Forums Event Espresso Premium Unable to activate EE 4.4.6.p, Fatal Error: wpdb::set_sql_mode()

Unable to activate EE 4.4.6.p, Fatal Error: wpdb::set_sql_mode()

Posted: December 10, 2014 at 12:49 pm


Ryan Chambers

December 10, 2014 at 12:49 pm

Hi All,

I have EE3 installed and I’m trying to upgrade to EE4. I followed the procedure of deactivating EE3 and all related plugins before trying to activate EE4.4.6.p. When I try to activate EE4 I receive the following message

Fatal error: Call to undefined method wpdb::set_sql_mode() in /home8/reativw3/public_html/cpa/wp-content/plugins/event-espresso-core-reg1/core/EE_System.core.php on line 165

I went into the PHP file and this is the section of code that seems to be the problem:

//ask that MySQL be forgiving of our mistakes, at least until we have time to iron them out properly
add_filter( ‘incompatible_sql_modes’, array( $this, ‘make_scrict_sql_incompatible’ ) );
add_filter( ‘required_sql_modes’, array( $this, ‘remove_strict_sql_requirement’ ) );
//and because wpdb has already set mode, we want to reset it
global $wpdb;
$wpdb->set_sql_mode();

Any ideas on what to do?

I’m running WP version 3.8.5 and I’m upgrading from EE 3.1.36.6.P.


Lorenzo Orlando Caum

  • Support Staff

December 10, 2014 at 1:01 pm

Hi, I have not see that error before but I do see a possible typo.

Could you try changing this at around line 172:

add_filter( ‘incompatible_sql_modes’, array( $this, ‘make_scrict_sql_incompatible’ ) );

to this and save changes:

add_filter( ‘incompatible_sql_modes’, array( $this, ‘make_strict_sql_incompatible’ ) );

Then please try again.


Lorenzo


Ryan Chambers

December 10, 2014 at 1:11 pm

I updated it and I’m still receiving the same error.

Plugin could not be activated because it triggered a fatal error.

Nice catch though!


Tony

  • Support Staff

December 10, 2014 at 1:26 pm

The reason for this is due to the WordPress version you are running.

The function set_sql_mode() was not introduced to WP until version 3.9.0

As you are running WP 3.8.5 that function does not exist.

May I ask if there is a reason you have not updated to 4.0.1?


Ryan Chambers

December 12, 2014 at 4:01 pm

Hi Tony,

I hadn’t checked to make sure all the plug ins were compatible. I updated everything on my end and the activation worked perfectly.

Thanks!!


Josh

  • Support Staff

December 18, 2014 at 1:02 pm

A little update on this:

We added a check for wpdb::set_sql_mode so EE4.4.7 and greater will activate if you’re on WP 3.8.

The support post ‘Unable to activate EE 4.4.6.p, Fatal Error: wpdb::set_sql_mode()’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 4 years, 11 months ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!
[for="input_96_5_3"]
[for="input_96_5_3"]
[gravityform id=96 title=false description=false]
  • This field is for validation purposes and should be left unchanged.
[i]
[i]
[gravityform id=69 title=false description=false]
  • This field is for validation purposes and should be left unchanged.