Skip to content
Advertisement

PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘remove_wpcf7’ not found or invalid function name

Apologies for this broad question but I am not hugely familiar with the Error Log entries at present. Any directives on where to begin the relevant research, would be greatly appreciated.

For the past 12 months, I have had the Google Authenticate Plugin, installed on a WordPress powered eCommerce website I work on. There had been no issues with the Plugin until a recent VPS and WordPress update. Since said updates, the Google Authenticate Plugin does not recognise any of the inputted codes. I am not sure if the error is being triggered by the WordPress update or the VPS itself.

I then checked the error_log and saw the below entry when trying to use the Google Authenticate Plugin:

mod_fcgid: stderr: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'remove_wpcf7' not found or invalid function name in /var/www/vhosts/example.com/httpdocs/wp-includes/class-wp-hook.php on line 286, referer: https://www.example.com/wp-admin/plugins.php

Troubleshooting

As standard, I deactivated all Plugins (Except for the WooCommerce Plugin) as well as the WordPress Theme I had created. I then simply activated WordPress’ Twenty Seventeen Theme. The error still persisted; leaving me wondering just what is causing the issue.

I can see there is a reference to WordPress’ core files. Maybe there is some incompatibilities?

Any directives on this, would be greatly appreciated … Even if to just help me expand on this question.

Advertisement

Answer

Finally found the solution … It related to the Server Time Settings.

If anyone else is experiencing a similar issue with their Google Authentication feature, you will need to ensure your Server’s time settings are in sync with the ‘Internet’s Clock’.

  1. Login into your VPS;
  2. Head to Tools & Settings > General Settings > System Time;
  3. Here, you should have a screen that looks something like:

    enter image description here

  4. Ensure that the Date & Time > Update system time is deselected;

  5. Ensure that Network time > Synchronize system time is selected;
  6. Then within Network time > Domain name or IP, enter 3.pool.ntp.org and select ‘Ok’. It was this step, which I needed to do in order to fix my own issue.
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement