Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sarukomine's avatar

CURL local SSL problem in Valet

I using Laravel Valet to developing, and I created two projects in Valet.

I have secured all site domains, and browsing all sites with HTTPS in Chrome is working.

But I found that site A can't call site B's API in coding, it always said SSL certificate problem: unable to get local issuer certificate.

So I try to update php.ini like below, but it is not working even I restart all services...

curl.cainfo = "/Users/username/.config/valet/CA/LaravelValetCASelfSigned.pem"

What did I missed?

0 likes
4 replies
vimalkaul's avatar

On your local development environment, you can pass SSL verification and this will be resolved.

navigate to Client.php file (vendor\guzzlehttp\guzzle\src\Client.php)

Change "verify" to false

 $defaults = [
        'allow_redirects' => RedirectMiddleware::$defaultSettings,
        'http_errors'     => true,
        'decode_content'  => true,
        'verify'          => false,
        'cookies'         => false
    ];
sarukomine's avatar

@vimalkaul there is no way to fix by php.ini or in other ways?

I don't think it is good idea, and I also don't want to change any files in vendor folder... Because I have to update Client.php file every time when guzzlehttp have been updated.

vimalkaul's avatar

@sarukomine we have the same setup for one of our project. We are using it from last 1 year. In last 1 year had to change that value twice in Client.php. Also this is for your local development only. On production server, it will work fine anyways.

Please or to participate in this conversation.