We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47630
    • 56 Posts
    Fatal Error In The Manager When Upgrade To PHP 7

    MODX Version: MODX Revolution 2.6.4

    Extras installed and versions:

    Collections 3.6.0
    Googlesitemap 2.0.2
    Migx 2.11.0 - beta
    PdoTools 2.3.5
    Redirector 2.0.7

    Using cPanel on a well known hosting environment I tried unsuccessfully to upgrade to either PHP 7.0.3, PHP 7.1.18 and PHP 7.2.5 I've had to fall back to PHP 5.5.38 and all is back working ok.

    When running on one of the PHP 7 versions the problem is solely with the MODX manager homepage (front end is fine), when I try to log into: www.xxxxxx.com/manager/ I get the following error message in the browser:
    [28-Jun-2018 09:20:48 CST6CDT] PHP Fatal error:  Uncaught Exception: DateTime::__construct(): Failed to parse time string (CST6CDT) at position 3 (6): Unexpected character in /home/xxxxxx.com/manager/controllers/default/dashboard/widget.grid-online.php:17
    Stack trace:
    #0 /home/xxxxxx.com/manager/controllers/default/dashboard/widget.grid-online.php(17): DateTime->__construct('CST6CDT')
    #1 /home/xxxxxx.com/core/model/modx/moddashboardwidget.class.php(246): modDashboardWidgetWhoIsOnline->render()
    #2 /home/xxxxxx.com/core/model/modx/moddashboardwidget.class.php(118): modDashboardWidgetInterface->process()
    #3 /home/xxxxxx.com/core/model/modx/moddashboard.class.php(78): modDashboardWidget->getContent(Object(WelcomeManagerController))
    #4 /home/xxxxxx.com/manager/controllers/default/welcome.class.php(64): modDashboard->render(Object(WelcomeManagerController))
    #5 /home/xxxxxx.com/core/model/modx/modmanagercontroller.class in /home/xxxxxx.com/manager/controllers/default/dashboard/widget.grid-online.php on line 17


    When checking the error logs I found this error message:
    [Thu Jun 28 09:20:48.278496 2018] [authz_core:error] [pid 47856] [client 146.66.101.106:56088] AH01630: client denied by server configuration: /home/xxxxxx.com/core/docs/changelog.txt


    The strange thing is that I only get the error on the MODX manager home page, if I log into a deeper page I get no issues, for example:
    https://www.xxxxxx.com/manager/?a=index&namespace=migx&configs=datequote


    This manager page loads just fine. Once inside the manager I can navigate to everywhere (apart from the manager home page) and update the site.

    However, when I click on the MODX icon in the manager then this same fatal error is triggered.

    I have reported this to the host technical support and they have replicated the issue and informed me this is a MODX or plugin issue.

    I kinda think it is timezone parameter related but I do not know where to start to solve this issue.

    Has anybody experienced this error or does anyone know what I can do to rectify it?



    This question has been answered by andytough. See the first response.

    • discuss.answer
      • 38783
      • 571 Posts
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 47630
        • 56 Posts
        Quote from: andytough at Jul 02, 2018, 05:30 AM
        It may be related to the problem discussed her:

        https://forums.modx.com/thread/103520/uncaught-exception-datetime-construct-new-installation

        Hey Andy,

        Cheers for that mate, it worked a treat smiley

        I finally got PHP 7 functioning correctly

        Thanks to Bob Ray as well whose solution I used.