Twitter API returns NULL on XAMPP

后端 未结 1 559
被撕碎了的回忆
被撕碎了的回忆 2020-12-31 20:56

I\'m trying to make a call to the Twitter API.

In short my problem is the same one as described here. Making my call I get NULL on a var_dump()

相关标签:
1条回答
  • 2020-12-31 21:18

    Like Jimbo pointed out in the comments above, the solution can be found here

    According to the article, the Windows PHP distribution doesn't come with an up-to-date bundle of the CA root certificates. However, the bundle can be downloaded here. I put it under C:\xampp\php\cacert.pem.

    The second step is to add curl.cainfo=c:\xampp\php\cacert.pem at the end of your php.ini file. Change the path to your folder where you saved the .pem-file.

    Restart Apache and now the problem should be solved!

    Thanks!

    0 讨论(0)
提交回复
热议问题