when I execute a PHP script which runs a cURL request to a .test domain that is setup on my Mac with Laravel Valet/dnsmasq, I get this error printed :
This problem is caused by curl versions, can you check your curl versions from terminal by
curl --version
and php --ri curl
When you run php --ri curl
you will see cURL Information => 7.63.0
this line.
Then you can compare your versions and you see which curl version is not working with dnsmasq.
I encountered this problem and my curl version was 7.64.0 in php.
For solve that issue:
You can uninstall curl-openssl, this command will remove last version of curl-openssl:
brew uninstall curl-openssl --ignore-dependencies
Then restart php:
brew services restart php
After restarting, php will see curl which is /usr/bin/curl
and this version can access local domain.