ReCaptcha Broken? Here’s the fix

Sometime recently ReCaptcha decommissioned its old API hosts: api*.recaptcha.net. The new API locations are at “http(s)://www.google.com/recaptcha/api”.

If you rely on Zend_Service_ReCaptcha (or its form element), you’ll need to change some constants in Zend/Service/ReCaptcha.php:

class Zend_Service_ReCaptcha extends Zend_Service_Abstract
{
    /**
     * URI to the regular API
     *
     * @var string
     */
    const API_SERVER = 'http://www.google.com/recaptcha/api';

    /**
     * URI to the secure API
     *
     * @var string
     */
    const API_SECURE_SERVER = 'https://www.google.com/recaptcha/api';

    /**
     * URI to the verify server
     *
     * @var string
     */
    const VERIFY_SERVER = 'http://www.google.com/recaptcha/api/verify';
... 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.