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

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

8 Comments

  1. Avatar
    NickDecember 30, 2008

    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

    Reply
  2. Avatar
    KainDecember 31, 2008

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

    Reply
  3. Avatar
    HenryJanuary 8, 2009

    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 !!!

    Reply
  4. Avatar
    mistermanJanuary 8, 2009

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

    Reply
  5. Avatar
    KailashJanuary 9, 2009

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

    Reply
  6. Avatar
    KailashMarch 6, 2009

    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

    Reply
  7. Avatar
    watch one tree hillNovember 27, 2009

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

    Have a nice day
    jenny martin
    ______________________________________________

    Reply
  8. Avatar
    DJ MarruApril 26, 2010

    Hey thanks, It works for me.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top
%d bloggers like this: