We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37464
    • 16 Posts
    First post - first week with modx and pdo.

    From the documentation:

    Loading xPDOManager and xPDOGenerator
    Create a PHP file where you have access to an xPDO instance. Then, let's set the Log Target to the browser, and raise it a bit to get more detailed information.


    Q: Where exactly do I have access to an xPDO instance after a default installation of MODX Revolution?

    This is what i found in the apache error log:
    [Mon Oct 24 20:01:47 2011] [error] [client 81.227.xxx.xx] PHP Notice:  Undefined variable: xpdo in /var/www/utils.mydomain.net/htdocs/test_xpdo_gen.php on line 2, referer: http://utils.mydomain.net/
    [Mon Oct 24 20:01:47 2011] [error] [client 81.227.xxx.xx] PHP Fatal error:  Call to a member function setLogLevel() on a non-object in /var/www/utils.mydomain.net/htdocs/test_xpdo_gen.php on line $

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

    [ed. note: th0car last edited this post 12 years, 6 months ago.]
    • discuss.answer
      When using MODX, you are using xPDO. The modX class extends xPDO, so when we talk about accessing xPDO in regards to MODX, you would be accessing it via the variable
      $modx
      . This of course, depends on what exactly you are trying to do.
        • 37464
        • 16 Posts
        Quote from: opengeek at Oct 25, 2011, 03:18 PM
        When using MODX, you are using xPDO. The modX class extends xPDO, so when we talk about accessing xPDO in regards to MODX, you would be accessing it via the variable
        $modx
        . This of course, depends on what exactly you are trying to do.
        Thank You - I don't think I really knew what I wanted to do at that time... Doing much better 3 years later though wink