doumeilmikv7099 2015-11-05 07:55
浏览 460

由于php_network_getaddresses更新PHP错误失败错误

So this morning I discover my website payment forms where breaking and on further investigation I discovered that it would appear that my server (Ubuntu 14.4) is unable to connect to the outside world, namely:

Running from CLI:

$php composer.phar self-update

[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Name or service not known failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

or a dig:

$ dig www.google.com

; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> www.google.com ;; global options: +cmd ;; connection timed out; no servers could be reached

Apache:

exception 'ErrorException' with message 'stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known'  

Similar posts on stack: here would suggest I change name servers...

So I am thinking that I should set up the server to use googles name servers: nameserver 8.8.8.8 nameserver 8.8.4.4

How is this done on Ubuntu 14.4 ?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Macbookpro 连接热点正常上网,连接不了Wi-Fi。
    • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
    • ¥15 linux驱动,linux应用,多线程
    • ¥20 我要一个分身加定位两个功能的安卓app
    • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
    • ¥15 IAR程序莫名变量多重定义
    • ¥15 (标签-UDP|关键词-client)
    • ¥15 关于库卡officelite无法与虚拟机通讯的问题
    • ¥15 目标检测项目无法读取视频
    • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析