googleads-php-lib icon indicating copy to clipboard operation
googleads-php-lib copied to clipboard

SSL certificate for localhost.

Open arafathussein opened this issue 9 years ago • 4 comments

I'm trying to test googleads-php-lib-master in my windows locahost (WAMP) . after getting credntial from running GetRefreshToken.php as on https://github.com/googleads/googleads-php-lib/wiki/API-access-using-own-credentials-(installed-application-flow)

I'm getting the error for SSL certificate as below image

Please advice

arafathussein avatar Nov 07 '17 01:11 arafathussein

README is there for a reason: https://github.com/googleads/googleads-php-lib#ssl-ca-files

hakimio avatar Nov 07 '17 09:11 hakimio

Thanks @hakimio for your comment. :)

To add a bit more, in some Windows environment, if somehow setting SSL CA using withSslCaFile() doesn't work, you may want to try setting them directly in php.ini. Possible locations for SSL CA files are listed in this section of Guzzle documentation.

Best, Knack

fiboknacky avatar Nov 09 '17 08:11 fiboknacky

你这个问题,我最初也遇到过并解决了。 解决方案排查三个地方。第一尽量使用php5.6以上的版本否则他会需要你安装证书; 第二,即使你升级到了5.6以后 你可能也需要在php.ini里设置curl.cainfo =“C:\ wamp \ bin \ php \ php5.6.19 \ extras \ ssl \ cacert.pem” 第三,找到扩展包guzzlehttp\guzzle\src\functions.php,这里面有配置crt证书的。找到crt在你的sdk里有并配置好 'C:\windows\ca-certificates.crt',

songxiaoxiao avatar Nov 30 '17 08:11 songxiaoxiao

Close due to inactivity from the reporter. Please let us know if you still need help. Thanks everyone for helping to provide useful information.

fiboknacky avatar Dec 05 '17 19:12 fiboknacky