我知道之前已经问过这个问题,但是我已经按照所有指南进行了操作,但它仍然无法正常工作
我将open_basedir设置为不在我的域上工作并且完全关闭safe_mode,继承人phpinfo();打印出两个
safe_mode Off Off
open_basedir /home/proagent/:/home/proagent:/tmp/:/tmp:/usr/local/lib/php/:/home/proagent/domains/xxx.com/bot::/home/proagent/domains/xxx.com/bot/ no value
但是我还在接受
警告:curl_setopt()[function.curl-setopt]:当在safe_mode中或在第58行的/home/proagent/domains/xxx.com/public_html/bot/scrape.php中设置open_basedir时,无法激活CURLOPT_FOLLOWLOCATION
任何想法都会很好!
答案 0 :(得分:0)
只要您设置了open_basedir
,并且您的phpinfo
输出显示您已将其设置(左侧值计数),CURLOPT_FOLLOWLOCATION
将无效。注释该行以允许访问所有文件,这是一个php.ini
示例:
; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.open-basedir
;open_basedir =