We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45778
    • 75 Posts
    In one implementation of MODx that I have, it gives some PHP error feedback (e.g. syntax error, etc.), but in another implementation, it just gives a blank white screen with no feedback of any kind. I didn't set it up differently on purpose. How do I turn on the error reporting features of MODx? Or do I have a broken installation?

    I saw this thread from many years ago, but it was unclear to me how to apply it to MODx Revolution:

    https://forums.modx.com/index.php/topic,46049.msg271820.html

    Any insights?

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

    • discuss.answer
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      It depends on how it's turned off, but often (not always) putting this in the top of the root index.php works great:

      <?php
      error_reporting(E_ALL);
      ini_set('display_errors', 1);


      On some servers they may also be logging php errors to a central error.log file (perhaps under a /var/log/ directory, or a logs directory above public_html) or have logs available from the control panel.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 45778
        • 75 Posts
        The solution below worked. Thank you. And I can put this in the php.ini file to achieve the same effect for the whole site. Thanks!

        Quote from: markh at Nov 13, 2014, 06:44 PM
        It depends on how it's turned off, but often (not always) putting this in the top of the root index.php works great:

        <!--?php
        error_reporting(E_ALL);
        ini_set('display_errors', 1);


        On some servers they may also be logging php errors to a central error.log file (perhaps under a /var/log/ directory, or a logs directory above public_html) or have logs available from the control panel. -->