Failed to connect to www.googleapis.com port 443: Network unreachable
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to implement google sign-in in my website that is written in Symfony2 using Google Client API . I followed the instructions here , but when I call $client->authenticate($code); command an exception is thrown telling that: Failed to connect to www.googleapis.com port 443: Network unreachable What is the problem? 回答1: Solution 2 (from update). it seems to be some bug with ipv6 interfaces and curl with php, so another solution is to set the appropiate option in curl function to connect to the remote server with ipv4 in your php