WordPress.org

Ready to get started?Download WordPress

Forums

Maintenance
[resolved] Call to undefined method DateTime::createFromFormat() Error after installing Pro (16 posts)

  1. econblogger
    Member
    Posted 4 months ago #

    Fatal error: Call to undefined method DateTime::createFromFormat() in /home/wp-content/plugins/maintenance/includes/functions.php on line 175

    Using
    Maintenance Pro 2.0.0
    Maintenance 2.0.1
    WordPress 3.8

    http://wordpress.org/plugins/maintenance/

  2. econblogger
    Member
    Posted 4 months ago #

    When you go to the page as a user you get this fatal error. Nothing else is displayed

  3. Fruitful Code
    Member
    Plugin Author

    Posted 3 months ago #

    econblogger,

    Do you have other plugins activated? What WordPress theme active at the moment?

    Try to check on clean, fresh install, everything must be okay.

  4. Fruitful Code
    Member
    Plugin Author

    Posted 3 months ago #

    econblogger,

    Find the problem. You need to update PHP on your server.

  5. econblogger
    Member
    Posted 3 months ago #

    Thanks for the response.

    I set the theme to be Twenty Ten v 1.5. Then disabled all plugins other than Maintenance and Maintenance Pro. They both are active. Is this correct?

    I tried on WP 3.71 and 3.8

  6. econblogger
    Member
    Posted 3 months ago #

    Also I re-downloaded the plugin from the fruitfulcode site but did not have any luck

  7. Fruitful Code
    Member
    Plugin Author

    Posted 3 months ago #

    econblogger,

    Problem not in the plugin. You need to update PHP version on your server to PHP 5.3+
    What php version you have at the moment?

  8. econblogger
    Member
    Posted 3 months ago #

    Awesome! That was the issue. I had PHP 5.2 and needed to upgrade to 5.3. Now it works. Thank you for the help

  9. janvanarkel
    Member
    Posted 3 months ago #

    same problem here...

    Fatal error: Call to undefined method DateTime::createFromFormat() in /home1/vanarkel/public_html/blog/wp-content/plugins/maintenance/includes/functions.php on line 175

    I do hope my provider HostGator is willing to update php.

  10. janvanarkel
    Member
    Posted 3 months ago #

    I had a chat with them and they installed it. working fine now.

  11. webber2012
    Member
    Posted 3 months ago #

    Any chance to revert this again so that it works with php 5.2.x as well (again)?

    Makes no sense at all having to upgrade php - which can cause major(!!!) problems with other scripts on all websites- just for a single WP plugin... I also don't understand why it is only 5.3.x compatibel, have found no other script or plugin yet requiring this.

    Earlier I have also -bought- the pro version and now slowly regret having done so. :-(
    So I now stuck having to use the older version ... dissapointing!

  12. Fruitful Code
    Member
    Plugin Author

    Posted 3 months ago #

    webber2012,

    What other problems you have after php update?

    http://codex.wordpress.org/Hosting_WordPress

    Recommended setup
    PHP 5.4 or greater is recommended.

    Plugins use this function
    DateTime::createFromFormat()

    They required version PHP 5.3+

  13. webber2012
    Member
    Posted 3 months ago #

    No other problems at all, but please also remember that the plugin is also used with older versions of WP.

  14. Fruitful Code
    Member
    Plugin Author

    Posted 3 months ago #

    Makes no sense at all having to upgrade php - which can cause major(!!!) problems with other scripts on all websites

    No other problems at all?

    Our plugin works correctly with minimum WordPress version 3.2

    Users must update WordPress to latest version in security reasons

  15. webber2012
    Member
    Posted 3 months ago #

    WP 3.8 is installed in my case.

  16. rahul300
    Member
    Posted 1 month ago #

    DateTime::createFromFormat() is available in PHP version >=5.3.
    Hopefully you are using PHP Version less tha 5.3
    You can use $timestamp = strtotime($yourFormattedDateTime); for lower version of php

Reply

You must log in to post.

About this Plugin

About this Topic