• 总结几个这几天解决的问题(与PHP、IPF、日志轮转相关)

    post by Holmesian / 2010-8-19 21:40 Thursday

    首先是关于PHP在PHP 5.2以上启用safe_mode or an open_basedir会导致CURLOPT_FOLLOWLOCATION失败,再导致curl_setopt/curl_setopt_array失败。

    官方对此有声明如下:

    Starting in PHP 5.2.0, CURLOPT_FOLLOWLOCATION can't be set via curl_setopt_array() (or curl_setopt()) when either safe_mode is enabled or open_basedir is set. In these cases, the order of CURLOPT_* settings in the array can be important.


    1.CURLOPT_FOLLOWLOCATION
    Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set
    2.curl_setopt_array()
    如果curl_setopt_array中包含CURLOPT_FOLLOWLOCATION键值,会导致所有options设置失败,让你感觉curl_setopt_array有问题,其实这个函数本身是没问题的。

    阅读全文>>