We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11793
    • 49 Posts
    The problem has two parts:
    1. XPDO seems to generate an error on every page load - "Redefining already defined constructor for class xPDOCriteria"

    2. The description stored in the log record is enormous. One record has 10,000+ chars - it seems to store the HTML output of the page that tripped the error. You can imagine how quickly this adds up.

    So, any way to either turn off error reporting, filter the types of errors loggged, or have the log table max out at 50 or so records?

    XPDO 1.0 from SVN as of 8 Nov, Modx 1.0.2, PHP 5, MySQL 5.1, Apache 2.2
    • Do not run xPDO with E_STRICT error_reporting, unless you want to use the new branches/2.0 version which is E_STRICT compliant (and PHP 5 only).
        • 11793
        • 49 Posts
        Jason, is this done at the php.ini level? If so, I’ve tried:

        error_reporting = E_ALL & ~E_NOTICE


        and the table ’event_log’ is still filling up with the above error. Note that the error is not displayed on screen, it is logged by MODx in System Events.

        MODx 1.0.1
        PHP v5.2.9-2 on Apache 2.2
        • Can you tell me the source, type and event id for these logged messages? If E_STRICT is not enabled, I’m not sure why they would be getting logged.
            • 11793
            • 49 Posts
            Type: 3
            EventId: 1
            Description: All HTML output for the snippet.
            Source:
            Just the name of a Snippet. The snippet is just an include statement for a PHP file. The included PHP file begins with the usual XPDO guff:

            ini_set("display_errors", 1);
            include_once ($modx->config['base_path'] . 'xpdo/xpdo.class.php');
            $dsn = $GLOBALS['database_type'] . ':host=' . $modx->db->config['host'] . ';dbname=' . str_replace('`', '', $modx->db->config['dbase']);
            $xpdo = new xPDO($dsn, $modx->db->config['user'], $modx->db->config['pass'], $modx->db->config['table_prefix']);
            // Must Hydrate Related Objects!
            $xpdo->config = array_merge($xpdo->config, array(XPDO_OPT_HYDRATE_FIELDS => true,
                                XPDO_OPT_HYDRATE_RELATED_OBJECTS => true));
            $xpdo->setDebug(false);
            $xpdo->setPackage('modx',MODX_BASE_PATH . 'model/');


              • 11793
              • 49 Posts
              *bump*

              Did we ever get a definitive answer for this? E_STRICT is not enabled in PHP.INI and yet the error log swells to hundreds of megabytes in size...

              I even tried disabling all errors via
              // Turn off all error reporting
              error_reporting(0);


              to no avail. I’m goin to resort to a Cron job that empties the event log table - I would prefer to remove the source of the error.
              • Use xPDO 2.0 branch or someone will need to fix error reporting in Evo; it seems to be logging E_STRICT regardless of the setting.
                  • 11793
                  • 49 Posts
                  Jason, is XPDO 2.0 recommended for use in a production scenario? If not, do you have a rough timeframe? I shall log the bug with Evo regardless.
                  • Quote from: hardboiled at Jan 06, 2010, 10:34 PM

                    Jason, is XPDO 2.0 recommended for use in a production scenario? If not, do you have a rough timeframe? I shall log the bug with Evo regardless.
                    It will be in the next few days; I’m working on some bug-fixes/improvements and an official RC release package as we speak.
                      • 20413
                      • 2,877 Posts
                      To turn of System events tracking
                      document.parser.class.inc.php
                      Line 29
                      @ ini_set("track_errors", "0");
                        @hawproductions | http://mrhaw.com/

                        Infograph: MODX Advanced Install in 7 steps:
                        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower