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

    I’ve got a script running on my modx site that check the availablility of a domain. Recently it’s started giving me the following error,

    Any help would be appreciated.

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

    PHP error debug
    Error: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Name or service not known
    Error type/ Nr.: Warning - 2
    File: /home/tso/public_html/manager/includes/document.parser.class.inc.php(705) : eval()’d code
    Line: 8

    Parser timing
    MySQL: 0.0005 s s (0 Requests)
    PHP: 0.0357 s s
    Total: 0.0361 s s
      • 25307
      • 114 Posts
      If you’re using a shared host, double check with your provider that allow_url_fopen is allowed...
        • 30735
        • 18 Posts
        Its my dedicated server :/
          • 33372
          • 1,611 Posts
          It’s pretty common to get errors with getaddrinfo(), since it requires a timely and correct response from your DNS server. So personally I would add some error-checking logic to your script to return something useful instead of causing a parse error. You may also want to check the DNS setup from your server and make sure that it’s still working properly.
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn't very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options