خطای CURLOPT_FOLLOWLOCATION cannot be activated هنگام فراخوانی curl

ساخت وبلاگ
سلام
من وقتی یک آدرس https رو با curl فراخوانی میکنم

curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set

در صورتی که همین کد های من توو لوکال به خوبی عمل کردن :

public function myCurlPost($url, $postfields) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_POST, 1); // Edit: prior variable $postFields should be $postfields; curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // On dev server only! if(curl_exec($ch) === false) { curl_close($ch); retu false; } else { curl_close($ch); retu true; } // Close handle }

توو اینترنت سرچ زدم انواع جواب ها برای خاموش کردن safe_mode توو php.ini رو هم انجام دادم اما بازم مشکل حل نشد 

php.ini داخل لوکال رو با php.ini سرور رو با هم مقایسه کردم توو php.ini سرور ای چند خط وجود نداشت اضافه کردم :

; Safe Mode
; http://php.net/safe-mode
safe_mode=Off
; By default, Safe Mode does a UID compare check when
; opening files. If you want to relax this to a GID compare,
; then tu on safe_mode_gid.
; http://php.net/safe-mode-gid
safe_mode_gid=Off
; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; (directory must also be in include_path or full path must
; be used when including)
; http://php.net/safe-mode-include-dir
safe_mode_include_dir=
; When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
; http://php.net/safe-mode-exec-dir
safe_mode_exec_dir=

اما بازم حل نشد :(

- - , .

برنامه نویس...
ما را در سایت برنامه نویس دنبال می کنید

برچسب : نویسنده : خنجی prog بازدید : 154 تاريخ : چهارشنبه 7 بهمن 1394 ساعت: 23:03

خبرنامه