您的位置:首页 > 理论基础 > 计算机网络

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

2014-05-23 11:31 417 查看
用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.

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  drupal 7 php5
相关文章推荐