2014年9月26日
百度sitemap v1.0插件,系统安装的URL路径一直提示校验中
错误提示:
[1]安装了百度sitemap后,点后台系统安装的URL路径的验证按钮一直提示在验证中
[2]发布文章或更新文章都出现警告,虽然文章能够正常发布。
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in ***/wp-content/plugins/baidusubmit/inc/sitemap.php on line 521 Warning: Cannot modify header information - headers already sent by (output started at ***/wp-content/plugins/baidusubmit/inc/sitemap.php:521) in ***/wp-admin/post.php on line 235 Warning: Cannot modify header information - headers already sent by (output started at ***/wp-content/plugins/baidusubmit/inc/sitemap.php:521) in ***/wp-includes/pluggable.php on line 1121
问题诊断:
linux的safe_mode本来是off的,通过修改对应得文件权限是无法解决问题也还是一样错误提示。估计是百度sitemap插件自身的bug。
解决方法:
打开sitemap.php这个文件(/wp-content/plugins/baidusubmit/inc/sitemap.php)
查找:
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
把最后的1改为0.
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);