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

    I have noticed, twice, that the site is not more accessible after the visit of a spider(google once, and yahoo the second time)
    This is the error I had :
     MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »
     
    PHP error debug
      Error: 	fopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known 	 
      Error type/ Nr.: 	Warning - 2 	 
      File: 	/var/www/vhosts/scuolamediacarducci.it/httpdocs/manager/includes/document.parser.class.inc.php(705) : eval()'d code 	 
      Line: 	172 	 
     
    Parser timing
      MySQL: 	0.0003 s s 	(0 Requests)
      PHP: 	0.0326 s s 	 
      Total: 	0.0329 s s
    


    How can I evitate this situation?

    Thanks .

    Michel.
      • 25663 MODX Staff
      • 12,272 Posts
      Try turning off teh built in stats (I’m assuming you’re using 0921). They’re rife with problems and will be removed from the next release.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 33706
        • 51 Posts
        Thanks.

        Stats have always been off.
          • 23383
          • 138 Posts
          Maybe you should use meta tag Robots with value NOINDEX,NOFOLLOW on some pages like 404 to prevent crawling and reduce log files.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            What snippet do you have that tries to do something with that file/service at line 172?
              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
              • 33706
              • 51 Posts
              How can I check that?
              Which snippet?

              Thanks.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I don’t know; what snippets do you have in your pages? That error is coming from a snippet, at line 172. The MODx parser uses the eval() function to tell PHP that a snippet’s content is PHP code. It looks like the snippet does something that needs PHP’s internal php_network_getaddresses function, which your version of PHP has a problem with. This could be something to do with RSS feeds, or perhaps an external logging function?

                http://bugs.php.net/bug.php?id=31308&edit=1

                I also found this, although I don’t think this is the cause in this case, since you’re trying to open a URL here.

                http://www.comdevweb.com/knowledgebase.php?faq_id=397&category_id=36&parent_id=47
                  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
                  • 33706
                  • 51 Posts
                  I think it has to do with RSS feeds, you are right.
                  For now I have disabled this snippet.

                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: _michel_ at Oct 20, 2006, 03:41 PM

                    I think it has to do with RSS feeds, you are right.
                    For now I have disabled this snippet.

                    Are you using NewsParserX by any chance? If so, this is a known issue; the error handling in the current version is pathetic at best. I am working on a more sophisticated RSS news aggregator that supports multiple-feeds, local caching capabilities, and much better error handling. Hopefully I’ll have a chance to release at least a beta of it next week.