anhskohbo / no-captcha

No CAPTCHA reCAPTCHA For Laravel.
https://packagist.org/packages/anhskohbo/no-captcha
MIT License
1.78k stars 234 forks source link

Validation failing in Laravel - Fix #6

Closed Maltex closed 9 years ago

Maltex commented 9 years ago

Was still getting a persistent failure for the validation on my local WAMP stack. It's an issue with WAMP's PHP (maybe the most recent version) not including a un-to-date CD certificates.

Download the cacert.pem file from http://curl.haxx.se/docs/caextract.html.

Update PHP ini: curl.cainfo = "C:\path\to\cacert.pem"

Worked perfectly for me.

Although I wouldn't advise people to do so, for testing purposes perhaps include a bool to switch SSL checking on/off.

Cheers for the project! Very helpful.

anhskohbo commented 9 years ago

Use file_get_contents() instead of curl. https://github.com/anhskohbo/no-captcha/commit/c884fdaffcaf6711753c2c16647cfae59d2ac857