Comments Plugin Error

I have installed Omeka (most recent version) and everything is working great...except the comments plugin. I get the following error when I try to add a comment as an unauthenticated user:

Omeka has encountered an error

Unable to Connect to tcp:// Error #0: php_network_getaddresses: getaddrinfo failed: Name or service not known

#0 /var/www/omeka/application/libraries/Zend/Http/Client.php(1059): Zend_Http_Client_Adapter_Socket->connect('', 80, false)
#1 /var/www/omeka/application/libraries/Zend/Service/ReCaptcha.php(494): Zend_Http_Client->request('POST')
#2 /var/www/omeka/application/libraries/Zend/Service/ReCaptcha.php(509): Zend_Service_ReCaptcha->_post('03AHJ_VusbwWz5A...', 'jiri AUGEru')
#3 /var/www/omeka/application/libraries/Zend/Captcha/ReCaptcha.php(239): Zend_Service_ReCaptcha->verify('03AHJ_VusbwWz5A...', 'jiri AUGEru')
#4 /var/www/omeka/application/libraries/Zend/Form/Element.php(1416): Zend_Captcha_ReCaptcha->isValid('', Array)
#5 /var/www/omeka/application/libraries/Zend/Form/Element/Captcha.php(282): Zend_Form_Element->isValid('', Array)
#6 /var/www/omeka/application/libraries/Zend/Form.php(2253): Zend_Form_Element_Captcha->isValid('', Array)
#7 /var/www/omeka/plugins/Commenting/controllers/CommentController.php(53): Zend_Form->isValid(Array)
#8 /var/www/omeka/application/libraries/Zend/Controller/Action.php(516): Commenting_CommentController->addAction()
#9 /var/www/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('addAction')
#10 /var/www/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#11 /var/www/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#12 /var/www/omeka/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#13 /var/www/omeka/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#14 /var/www/omeka/index.php(23): Omeka_Application->run()
#15 {main}

That looks like a problem when Omeka is trying to do the ReCaptcha. Am I guessing right that everything works when you are authenticated?

I have seen that error before, and restarting Apache has fixed, but I don't really understand why that worked or what the underlying cause is. If possible, though, I'd try that and see if it works while we try to find a more stable solution.

Unfortunately, restarting Apache did not fix the problem. Any other ideas?


Sounds like a server configuration/connectivity issue.

The PHP code for the captcha has to connect to Google's ReCaptcha servers to verify the results. The message you're getting is basically saying that your server doesn't know how to get to

I would hazard a guess that there's something up with your server's DNS settings, resolv.conf or something similar. If you have SSH access, you could try ping to verify that this is the problem.

Oh, GOOD GRIEF!!! It is always completely embarrassing when you forget to both do and check for the obvious. When I set up the static IP on the server in the network file, I neglected to add the DNS entries. Thanks, John!