We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30376
    • 10 Posts
    Getting the following error--was getting this before upgrading from 0.9.6 to 1.0.5. Is this a PHP or MODx error, and how can I fix it. Any ideas?

    « MODx Parse Error »

    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Please contact support about failure
    Error type/ Nr.: Warning - 2
    File: /home/tonomud/public_html/jimclemens/manager/includes/document.parser.class.inc.php
    Line: 814
    Line 814 source: $snip= eval ($snippet);

    Parser timing
    MySQL: 0.0068 s (7 Requests)
    PHP: 0.0577 s
    Total: 0.0645 s
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Doesn’t sound like anything coming from MODx. It could be some kind of security setting on your server that doesn’t allow the eval() function to run. A php.ini can contain a directive to disable_functions.

      You may or may not be able to override this in the .htaccess file or with a custom php.ini file, depending on your server’s configuration.

      http://www.webhostingtalk.com/archive/index.php/t-195763.html
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 21257 MODX Staff
        • 730 Posts
        If not the inability to run eval() it could simply be a php error in whatever snippet is trying to run there.
        Do you have any custom snippets? If you could isolate what snippets are running on the page in question, it would be helpful.
          Mike Schell
          Lead Developer, MODX Cloud
          Email: [email protected]
          GitHub: https://github.com/netProphET/
          Twitter: @mkschell
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          If it were a snippet causing the failure, the error message would include the line number in the eval()’ed code (in the snippet itself) causing the actual error. This message is just indicating that the line in the parser file containing the eval() function is where the error is occurring.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 21257 MODX Staff
            • 730 Posts
            Good point Susan.. chasing down the disabling of eval() on the server sounds like the way to go then
              Mike Schell
              Lead Developer, MODX Cloud
              Email: [email protected]
              GitHub: https://github.com/netProphET/
              Twitter: @mkschell
              • 30376
              • 10 Posts
              thanks, all! I checked about the eval() function with my host, and they gave me a line of code to put in my htaccess file (also would have worked to edit the php.ini file, they say) and it now works. Apparently they’re using some sort of server security module called "strainer", which apparently leads to some false positives, like my situation. Anyway, site is back and working correctly. thanks for the pointers!