The Problem:

Today I am making some changes the an old Laravel application that I have not updated in years. The applications still is running on Laravel 9. When I started the application it showed a bunch of depecrated errors.

The solution was to update composer. I executed the computer update command and thats when my problem started. I got this error and I didn't know what to do because in the past the curl had worked. The error message said:

https://repo.packagist.org could not be fully loaded (curl error 60 while downloading https://repo.packagist.org/packages.json: SSL peer certificate or SSH remote key was not OK), package information was loaded from the local cache and may be out of date      

ERROR:

In CurlDownloader.php line 390:
                                                                 
curl error 60 while downloading https://repo.packagist.org/p2/spatie/ignition-contracts.json: SSL peer certificate or SSH remote key was not OK                                        
                                                                
update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-m|--minimal-changes] [--patch-only] [-i|--interactive] [--root-reqs] [--bump-after-update [BUMP-AFTER-UPDATE]] [--] [<packages>...]

SOLUTIONS:

1. I opened public/index.php in my Laravel project and added the phpinfo() function to find the php.ini file.

the Configuration File (php.ini) Path  had no value, but the Loaded Configuration File  had a value of C:\Users\15t\.config\herd-lite\bin\php.ini

The problem here was that I had not configured the herd server for curl, I also run a XAMPP on my windows, I needed to start wamp which contained the old php.ini configurations. I also had to change the PATH to php in windows.

Here is some helpful information

Other Helpful info:

How to get php that in windows command: php -r "echo PHP_BINARY;" More info here

Other Solutions

I tried these different solutions but they did not work for me:

1. Update laravel composer.json to later laravel version

2. Disable TLS command:

$ composer config -g -- disable-tls false

or

$ composer config -g secure-http false

$ composer clearcache

3. Download lates cacert.pem file: https://curl.se/docs/caextract.html (more infor here)