Notice: Undefined variable: errno in drupal_http_request() (line 829 of ***.com/httpdocs/inclu

6 篇文章 0 订阅

用drupal做了一个网站,在本机开发和测试都没出现这个警告,发布到万网的阿里云服务器上后,出现了如题的错误。google+drupal官网,说是因为安全原因引起的,服务器提供商没有开启一个叫要stream_socket_client()的函数,去万网的控制面板查看php函数设置,没有这个函数,倒是看到一个fsockopen的函数默认被禁用了。

 

试着打开这个函数,然后刷新网站,警告消失了。

 

官网上看到的一段话,记一下

 

Notice: Undefined variable: errno in drupal_http_request() (line 829 of /foobar.com/includes/common.inc).
Notice: Undefined variable: errstr in drupal_http_request() (line 830 of /foobar.com/includes/common.inc).

In my case (as it turns out), my hosting provider had disabled a whole basket of php functions (41 in total) for security reasons. One of the disabled functions was stream_socket_client().

My host provider was kind enough to enable this function (after I told them it was now part of Drupal 7 core) but they offered the opinion that this was a security compromise.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值