We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Hi All,

    Moved a site to a new server and I am now getting the following :
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: simplexml_load_file() [function.simplexml-load-file]: php_network_getaddresses: getaddrinfo failed: Name or service not known
    Error type/ Nr.: Warning - 2
    File: /home/webdevc/public_html/manager/includes/document.parser.class.inc.php(769) : eval()’d code
    Line: 2

    Parser timing
    MySQL: 0.0094 s (4 Requests)
    PHP: 0.0340 s
    Total: 0.0434 s

    Does anyone know why this would happen ??

    Thankyou
      • 4310
      • 2,310 Posts
      Here’s one possible cause/answer from a Google search using the error as the search term :
      http://bytes.com/topic/php/answers/640272-php_network_getaddresses-getaddrinfo-failed-name-service-not-known
      Looks like the server configuration is not quite right?
        • 22840
        • 1,572 Posts
        Thanks bunk58,

        This is a confusing one, I’ve narrowed it down to some PHP to pull in blog feeds from a Wordpress blog, once I removed it the site worked fine so it was simplexml_load_file that was causing the issue.

        Now the confusing thing is that I have another site on the same server that is working fine and using the exact same code to pull in the feed, the only difference is the versions of Modx being used ( the working one is the latest and the non working one is the previous version of Modx.

        At least the site is loading now so I’ll look into it more tomorrow i think

        Cheers
          • 4310
          • 2,310 Posts
          I’m running 0.9.6.3 and am using simplexml_load_file() with the feed full url okay.
          Haven’t tried it on other versions, I did note it wouldn’t work on a feed from the same domain.
            • 22840
            • 1,572 Posts
            That’s even weirder then.

            The one that’s not working is trying to pull a feed from an external site ( the feed is there if I type the url ) and the working one is pulling the feed from their own site ( www.site.com/blog) but that’s using the latest release of modx.