Wheel php script in cmd with curl

1

I'm testing an api, trying to use some features presented the following message:

  

Something went wrong: Network: CURL error 60: SSL certificate problem:   unable to get local issuer certificate (see    link ).

Through searching I discovered that it was necessary to add the cacert.pem certificate in php.ini like this:

curl.cainfo = "C:/wamp64/bin/php/php5.6.25/extras/ssl/cacert.pem"

It worked perfectly, but I need to run a certain api code that only works on the terminal (cmd) and when trying to run it presents this same message that appeared in the browser:

  

Something went wrong: Network: CURL error 60: SSL certificate problem:   unable to get local issuer certificate (see    link ).

I tried to install curl-7.46.0-win64.exe, now the curl works on the terminal, but the message when trying to run the api persists.

Api: link

I'm trying to run the example: "pushReceiver.php"

Update

I thought it might be the php version since the wamp has two, five and seven, but both return the same message:

c:\wamp64\bin\php\php5.6.25>php.exe C:\wamp64\www\Instagram\index.php
Something went wrong: Network: CURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html).

c:\wamp64\bin\php\php5.6.25>cd ..

c:\wamp64\bin\php>cd php7.0.10

c:\wamp64\bin\php\php7.0.10>php.exe C:\wamp64\www\Instagram\index.php
Something went wrong: Network: CURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html).
    
asked by anonymous 26.10.2017 / 15:38

1 answer

0

In the wamp folder there is more than one php.ini file, I had to change them all to work, this was the problem.

Folders where php.ini files are located:

C:\wamp64\bin\apache\apache2.4.23\bin
C:\wamp64\bin\php\php7.0.10
C:\wamp64\bin\php\php5.6.25

In other words, it was working via browser because the browser php.ini is configured, but not the console.

    
08.11.2017 / 19:42