无法激活CURLOPT_FOLLOWLOCATION [英] CURLOPT_FOLLOWLOCATION cannot be activated

查看:178
本文介绍了无法激活CURLOPT_FOLLOWLOCATION的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我在多个服务器上保持这个恼人的错误(它的警告,所以我会忽略它,但我需要的功能)

So I keep getting this annoying error on multiple servers(its a warning, so I'd ignore it, but I need the function)


警告:curl_setopt()[function.curl-setopt]:当启用safe_mode或在第56行的/home/xxx/public_html/xxx.php中设置open_basedir时,不能激活CURLOPT_FOLLOWLOCATION

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /home/xxx/public_html/xxx.php on line 56

我如何通过SSH修复这个问题?

How would I go about fixing this via SSH?

推荐答案

在您的php.ini文件中设置 safe_mode = Off 通常在服务器的/ etc /中)。如果这已经关闭,然后环顾php.ini文件中的 open_basedir 内容,并相应地更改。

Set safe_mode = Off in your php.ini file (it's usually in /etc/ on the server). If that's already off, then look around for the open_basedir stuff in the php.ini file, and change it accordingly.

基本上,跟踪位置选项已被禁用作为一种安全措施,但PHP的内置安全功能通常比安全性更加恼人。事实上, safe_mode 已在PHP 5.3中弃用< a>。

Basically, the follow location option has been disabled as a security measure, but PHP's built-in security features are usually more annoying than secure. In fact, safe_mode is deprecated in PHP 5.3.

这篇关于无法激活CURLOPT_FOLLOWLOCATION的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆