WP-Defender update from Hub took site down!

Since the great news yesterday that we can update plugins etc. with the hub....tried updating WP-Defender and it took the site down. Had to FTP in and rename the plugin....then deleted the defender plugin folder and tried to reinstall defender....took the site down again....going renamed the defender plugin folder to wp-defender1111 but thinking I should just delete it. Really want to get Defender back working on this site. Please advise

Got these two errors:

Fatal error: Call to undefined method DateTime::diff() in /home/content/80/9282280/html/wp-content/plugins/wp-defender/app/module/audit-log-module/component/class-wd-audit-api.php on line 54

Warning: include(/home/content/80/9282280/html/wp-content/plugins/wp-defender/app/component/class-wd-dir-tree.php) [function.include]: failed to open stream: No such file or directory in /home/content/80/9282280/html/wp-content/plugins/wp-defender111/app/class-wd-utils.php on line 97

Warning: include() [function.include]: Failed opening '/home/content/80/9282280/html/wp-content/plugins/wp-defender/app/component/class-wd-dir-tree.php' for inclusion (include_path='.:disappointed:usr/local/php5/lib/php') in /home/content/80/9282280/html/wp-content/plugins/wp-defender111/app/class-wd-utils.php on line 97

Fatal error: Call to undefined method DateTime::diff() in /home/content/80/9282280/html/wp-content/plugins/wp-defender111/app/module/audit-log-module/component/class-wd-audit-api.php on line 54

  • Vaughan

    Hi Mike,

    Hope you're well?

    You could do with increasing the max_execution_time in php.ini

    You may need to ask your webhost how to do that on your server.

    You need to increase it to at least;

    max_execution_time = 300

    Also another likely issue you willcertainly have is that your PHP version is very old, 5.2 reached end of life quite a long time ago now and it's not recommended to use that anymore. I would highly recommend asking your host to update your PHP version to aminimumof 5.6.x or PHP7 otherwise you are likely to face more issues in future.

    Hope this helps

  • Chris Bourne


    The function if it's calling the internal PHP module is not included in 5.2

    If you are hosted on a Multi-PHP platform you might be able to update your PHP to 5.3.x with minimal impact to the rest of your code.

    Make sure you backup first.

    If your provider only offers 5.2 and no other options I would think seriously about the rest of the aspects of the hosting account such as security and tenant protection.

    For your reference find the link below in regards to 5.2's end of life.

    PHP 5.2 is in End of life.

    End of life (EOL) means that there is no further develop and support planned for that version. It is version specific.

    There has been a big change from how things were done in the 5.2 so I would even consider this time a good time to plan the move to 5.6 or 7.0.

    Most modern day PHP scripts will not work with 5.2

    Whilst it's not a help to you right now I hope this helps gear you up with the information you need to talk to your hosting provider.


  • MSAMike

    register_globals = off
    allow_url_fopen = off

    expose_php = Off
    max_input_time = 60
    max_execution_time = 600
    variables_order = "EGPCS"
    extension_dir = ./
    upload_tmp_dir = /tmp
    precision = 12
    SMTP = relay-hosting.secureserver.net
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

    ; Only uncomment zend optimizer lines if your application requires Zend Optimizer support


    ; -- Be very careful to not to disable a function which might be needed!
    ; -- Uncomment the following lines to increase the security of your PHP site.

    ;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
    ; phpinfo, exec, system, dl, fsockopen, set_time_limit,
    ; popen, proc_open, proc_nice,shell_exec,show_source,symlink"

  • Vaughan


    Is this a php.ini file that is located in the public_html? or a .user.ini file etc?

    php.ini files aren't usually recursive, but if your server is using CGI/fastCGI or suPHP you might be able to make it recursive by adding the following to the top of your htaccess.

    <IfModule mod_suphp.c>
    suPHP_ConfigPath /home/vaughanm/public_html
    <Files php.ini>
    order allow,deny
    deny from all

    Obviously change the path to the correct path for your php.ini file. As Isay though, that would only work if your site has mod_suphp enabled.

    If it's the main php.ini you have changed on a vps or dedicated server (not shared hosting), then you may need to restart the apache service for changes to take effect.

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.