php error file_get_contents()
内部邀请码:C8E245J (不写邀请码,没有现金送)
国内私募机构九鼎控股打造,九鼎投资是在全国股份转让系统挂牌的公众公司,股票代码为430719,为“中国PE第一股”,市值超1000亿元。
piwik 放在服务器跑时,出现如下错误:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /usr/local/apache2/htdocs/heshun/kkk/zz.php on line 99
Warning: file_get_contents(http://www.php.net): failed to open stream: Invalid argument in /usr/local/apache2/htdocs/heshun/kkk/zz.php on line 99
to my surprise, when I log into my local net(BSD OS, PHP 4.3.10 ) and I run it by following:
google 了一把,检查如下问题:
1、检查 php.ini 的配置 allow_url_fopen 是否为 on
2、检查 dns 错误,直接在 /etc/resolve.conf 添加 dns 服务器即可。
比如:
- #
- # Before you change this file manually, consider to define the
- # static DNS configuration using the following variables in the
- # /etc/sysconfig/network/config file:
- # NETCONFIG_DNS_STATIC_SEARCHLIST
- # NETCONFIG_DNS_STATIC_SERVERS
- # NETCONFIG_DNS_FORWARDER
- # or disable DNS configuration updates via netconfig by setting:
- # NETCONFIG_DNS_POLICY=''
- #
- # See also the netconfig(8) manual page and other documentation.
- #
- # Note: Manual change of this file disables netconfig too, but
- # may get lost when this file contains comments or empty lines
- # only, the netconfig settings are same with settings in this
- # file and in case of a "netconfig update -f" call.
- #
- ### Please remove (at least) this line when you modify the file!
- nameserver 10.30.1.9
- nameserver 10.30.1.10
php error file_get_contents()的更多相关文章
- CVE-2021-3129:Laravel远程代码漏洞复现分析
摘要:本文主要为大家带来CVE-2021-3129漏洞复现分析,为大家在日常工作中提供帮助. 本文分享自华为云社区<CVE-2021-3129 分析>,作者:Xuuuu . CVE-202 ...
- file_get_contents HTTP request failed! Internal Server Error
使用file_get_contents报错 Severity: WarningMessage: file_get_contents(http://geetest.com:8000/select?gid ...
- PHP使用file_get_contents或curl请求https的域名内容为空或Http 505错误的问题排查方法
前段日子,突然接到用户的反馈,说系统中原来的QQ登录.微博登录通通都不能用,跟踪代码进去后发现,是在 file_get_contents这个函数请求QQ登录的地方报错,在用该函数file_get_co ...
- ubuntu下file_get_contents返回空字符串
ubuntu下file_get_contents返回空字符串 | 浏览:302 | 更新:2014-03-30 10:11 本文起初面临的问题是PHP中SoapClient不好使,最后file_get ...
- 跨域、curl、snoopy、file_get_contents()
定义:可以称为”信息采集/模拟登录”技术,可以实现对某个地址做请求,同时按照要求传递get或post参数. curl本身是php的一个扩展,同时也是一个利用URL语法规定来传输文件和数据的工具,支持很 ...
- PHPsocket、CURL、File_get_contents采集
1.socket采集.采用最底层的,它只是建立一个长连接,然后我们自己构造http协议字符串去发送请求.例如想获取这个页面内容(http://tv.youku.com/?spm=a2hww.20023 ...
- 比 file_get_contents() 更优的 cURL 详解(附实例)
PHP 可以使用 file_get_content() 函数抓取网页内容,但却无法进行更复杂的处理,譬如文件的上传或下载. Cookie 操作等等.而 cURL 提供了这些功能. 一.cURL简介 在 ...
- file_get_contents函数
今天迁移一个SDK项目到新的机子上,发现项目无法跑起来,报500错误,通过分析,发现原来是file_get_contents函数再作怪,代码如下 public function __construct ...
- PHP函数file_get_contents()使用 https 协议时报错:SSL operation failed
场景: file_get_contents() 函数是用于将文件的内容读入到一个字符串中,是读取文件内容常用的函数之一. 但是有时在服务器上使用file_get_contents() 函数请求http ...
随机推荐
- plsql developer 使用技巧
plsql developer 使用技巧 Oracle数据库相信已成为很多企业构建自身关键业务的重要后台支撑,也是众多开发人员常常采用的后台.但Oracle自己提供的一套客户端工具不是很好用,极大的影 ...
- Xcode中使用svn时,报证书验证错误Error validating server certificate for
转:http://blog.csdn.net/yhawaii/article/details/7511141 今天使用Xcode自带的svn客户端时,总是连接不上服务器,报如下错误: Error va ...
- msssql 用numberic(38)替代int去解决int不够的问题
发现ms sql server的问题int(-2^31 ~ 2 ^ 31 -1)与程序中的UINT有时会对不上的时候, 发现如果用numberic(32)来做判断好像解决, 暂时就现在的插入操作来看, ...
- 字符集编码Unicode ,gb2312 cp936
这是一篇程序员写给程序员的趣味读物.所谓趣味是指可以比较轻松地了解一些原来不清楚的概念,增进知识,类似于打RPG游戏的升级.整理这篇文章的动机是两个问题: 问题一:使用Windows记事本的“另存为” ...
- 查询MySQL锁等待的语句
select 'Blocker' role, p.id, p.user, left(p.host, locate(':', p.host) - 1) host, tx.trx_ ...
- 音频PCM格式
经常见到这样的描述: 44100HZ 16bit stereo 或者 22050HZ 8bit mono 等等. 44100HZ 16bit stereo: 每秒钟有 44100 次采样, 采样数据用 ...
- 软件测试技术(四)——闰年判断器+ int.Parse错误如何解决
目标程序 本次所测试的目标程序是一个闰年判断器,我们知道,一般情况下年份被4整除就可以了,但是如果遇到百年的时候还需要被400整除,于是有了如下的逻辑判断: bool isRunNian = fals ...
- CSS常用十大技巧
技巧1 去掉网页超链接的下划线 去掉网页超链接的下划线,在<head>与</head>之间相应的位置输入以下代码. <style type="text/css ...
- [GRYZ2015]工业时代
试题描述 小FF的第一片矿区已经开始运作了, 他着手开展第二片矿区……小FF的第二片矿区, 也是”NewBe_One“计划的核心部分, 因为在这片矿区里面有全宇宙最稀有的两种矿物,科学家称其为NEW矿 ...
- libsvm使用方法总结
1.所需要软件下载: (1)libsvm(http://www.csie.ntu.edu.tw/~cjlin/libsvm/) (2)python (3)gnuplot 画图软件(ftp://ftp. ...