curl_exec() has been disabled for security reasons in Wordpress 2.7

December 25, 2008 · Filed Under Web Hosting 

The latest version of Wordpress 2.7 requires curl_exec() function. However, for security reasons, many hosts do not allow to use this function and due to this your wordpress blog will not function properly. There is an alternative available to use Wordpress 2.7 without enabling curl_exec() function.

First download this plugin and install it:

http://trac.wordpress.org/attachment/ticket/8086/list_transports.php?format=raw

After you activate it, you’ll see a list of what transports WordPress detected as working at the bottom of the admin screens (in the footer). Once you know these, you can deactivate and delete the plugin.

If you are not able to activate the plugin you can ignore the above step.

Now, open functions.php which is in your theme directory and add the following code:

function block_transport() { return false; }
add_filter('use_http_extension_transport', 'block_transport');
add_filter('use_curl_transport', 'block_transport');
add_filter('use_streams_transport', 'block_transport');
add_filter('use_fopen_transport', 'block_transport');
add_filter('use_fsockopen_transport', 'block_transport');

That will block all five possible transports from working. Now just remove the add_filter line on the transport that you want WordPress to actually use.

Added: You will need to add above code in php block and put at the end of function.php file.

Thanks to Otto42 for his advice and solution.

Contact us at support@webhostingdiscussion.net if you want us to troubleshoot this problem.

Kailash

Related Posts

  1. WordPress 2.7 is coming to WordPress.com on Thursday, December 4, 2008
  2. phpBB 3.0.7 security vulnerability
  3. How to upgrade to Wordpress 2.7
  4. WordPress 2.8 is available now
  5. Task Manager has been disabled by your administrator

Comments

8 Responses to “curl_exec() has been disabled for security reasons in Wordpress 2.7”

  1. Nick on December 30th, 2008 8:29 PM

    Thanks for your alternative solution to this issue. I was in big trouble as my host had dined the request to enable this function on the server and this has helped me to fix my blog. Thanks !!

    Nick

  2. Kain on December 31st, 2008 4:28 AM

    Thanks for your solution. I had the same problem and I could fix it by following this article. :)

  3. Henry on January 8th, 2009 7:41 PM

    I was really thinking to switch my host as they have disabled curl_exec() function and I had upgrade my blog to Wordpress 2.7. But I have found this solution to fix the issue without enabling curl_exec() function. Thanks !!!

  4. misterman on January 8th, 2009 11:49 PM

    might of been an idea to actually say where in functions.php you put that code.

  5. Kailash on January 9th, 2009 4:59 AM

    You will need to add above code in php block (between < ?php and ?>) and put at the end of function.php file.

  6. Kailash on March 6th, 2009 4:43 AM

    This has been fixed in Wordpress 2.7.1. Now we do not require to modify function.php if curl_exec() function is disabled on the server.

    Kailash

  7. watch one tree hill on November 27th, 2009 10:20 AM

    I will bookmark and continue reading your blog in the future! Thanks alot for the informative post!

    Have a nice day
    jenny martin
    ______________________________________________

  8. DJ Marru on April 26th, 2010 4:51 AM

    Hey thanks, It works for me.

Leave a Reply

You must be logged in to post a comment.

Untitled Document