Solve the WordPress structured data plug-in Warning: curl_setopt () [function. curl-setopt]

Source: Internet
Author: User
Tags curl error code

I. Site verification always displays "checking ..."

Two problems I encountered when using the WordPress structured data plug-in

I am not clear about the reason. I have submitted a question to the webmaster and have not answered yet. If there is a reply, the three good citizens will share it as soon as possible.

Of course, if you know the reason, please kindly advise. Thank you very much!

II. Warning code displayed when publishing or updating an article

After the WordPress structured data plug-in is enabled, an error code is displayed when an article is published or updated. The content is:

 

The code is as follows: Copy code

Warning: curl_setopt () [function. curl-setopt]: CURLOPT_FOLLOWLOCATION
Cannot be activated when in safe_mode or an open_basedir is set in
/******/Wp-content/plugins/baidusubmit/inc/sitemap. php
On line 521 www.111cn.net

Warning: Cannot modify header information-
Headers already sent by (output started
/******/Wp-content/plugins/baidusubmit/inc/sitemap. php: 521) in
/******/*******/Wp-admin/post. php on line
233

Warning: Cannot modify header information-headers
Already sent by (output started
/******/Wp-content/plugins/baidusubmit/inc/sitemap. php: 521) in
/******/*******/Wp-supported des/pluggable. php on line 896

For solutions to this problem, refer to the following method:

When safe_mode and open_basedir are enabled, use the following statement in the program:

The code is as follows: Copy code
Curl_setopt ($ curl, CURLOPT_FOLLOWLOCATION, 1 );

Is there a 301,302 status error?

[14:17:41] PHP Warning: curl_setopt (): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in msn. class. php on line 819

SolutionYesThe curl statement does not use curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, true). You can customize a function in the php function.

Curl_redir_exec function
Curl_redir_exec

Curl_redir_exec ($ ch) replace curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, true) statement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.