Forums

fopen disabled - anyway to make pingback works (19 posts)

  1. akira01
    Member
    Posted 1 year ago #

    I understand that pingback will not work if the server fopen is disabled. My host said that they have to disable it for security reason. after they have disabled, I can not longer receive pingback (a note in a comment saying that someone is linking my post at their site)

    Are there anyways of making this pingback works without changing host.

    ** They told me that Curl can be used.

    Please advise. Thanks

  2. akira01
    Member
    Posted 1 year ago #

    Anyone have an idea of how to solve this.

    Please advise. Thanks in advance.

  3. akira01
    Member
    Posted 1 year ago #

    Any help would be very much appreciated.

    Thanks

  4. Otto42
    Moderator
    Posted 1 year ago #

    My host said that they have to disable it for security reason.

    Yes. Many bad hosts think this. It's a common misconception. They are wrong. For security, they should disable allow_url_include, not allow_url_fopen. This, of course, assumes they are running a modern version of PHP in the first place (5.2 and up). Sadly, many hosts still support PHP 4, and so resort to extremely stupid measures like this in the name of security.

    Are there anyways of making this pingback works without changing host.

    No.

    ** They told me that Curl can be used.

    Yes, WordPress already supports using curl if allow_url_fopen is disabled. If it's not working, then they don't have curl working.

    I would simply switch hosts. If a host, whom I'm paying for, doesn't understand basic security principles, then I don't want to use them.

    Could you tell us who the hosting company is so that we can recommend that WordPress users avoid them in the future?

  5. theapparatus
    Member
    Posted 1 year ago #

    Yes, WordPress already supports using curl if allow_url_fopen is disabled. If it's not working, then they don't have curl working.

    Actually I wondered that as well because every other thread on this said that wordpress would fall back to curl if fopen was not available.

    Thanks. You helped me out as well.

  6. Otto42
    Moderator
    Posted 1 year ago #

    If you're interested, the relevant code is in wp-includes/functions.php, in the function wp_remote_fopen(). That's where the curl fallback is.

  7. akira01
    Member
    Posted 1 year ago #

    I have check phpinfo() and it shows:
    allow_url_fopen - off(local) - off(master)

    cURL support - Enabled
    cURL Information - libcurl/7.16.0 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6

    If cURL is enabled, wordpress should place the pingback correctly in the comments, right? But Mine is not. I have disabled all plugins and still pingback is not showing in my post comment area.

    Any advise. Thanks

  8. akira01
    Member
    Posted 1 year ago #

    Any advise would be very much appreciated. Thanks

  9. Otto42
    Moderator
    Posted 1 year ago #

    It's checking for the presence of the curl_init function in PHP. So if you have curl enabled, then it will use it.

    Double check that you're running the latest version of WordPress (2.3.1). Older versions didn't have this support, I think.

  10. akira01
    Member
    Posted 1 year ago #

    Oh, I am still using 2.2.3. Well Got to upgrade, I guess.

    Thanks

  11. Otto42
    Moderator
    Posted 1 year ago #

    Also try running this code in it's own page, see what it does:

    <?php
    if (function_exists('curl_init')) {
    echo "Curl found";
    } else {
    echo "Curl not found";
    }
    ?>
  12. akira01
    Member
    Posted 1 year ago #

    I have upgraded to 2.3.1. Well Pingback still can't work.

    Otto, May I know how to run this code.

    Please advise. Thanks

  13. akira01
    Member
    Posted 1 year ago #

    I place this code in single.php and it says "Curl Found"

    But the pingback just can't work? Hmmm...

    Any advise. Thanks

  14. akira01
    Member
    Posted 1 year ago #

    I checked the php.ini and the Curl is written like this :

    cURL support enabled
    cURL Information libcurl/7.16.0 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6

  15. Otto42
    Moderator
    Posted 1 year ago #

    akira01: Do future dated posts also not work for you?

    You may be having a wp-cron related problem instead.

    When you make a post, it doesn't perform the pingbacks and such right away. These get delayed through the wp-cron process. Then they run in the background later. Because of the way some servers are configured, wp-cron does not work on them.

    If you have access to the database directly (through phpMyAdmin), you can look at the postmeta table for keys with the name of "_pingme". If they are there, then wp-cron has yet to take care of them and perform the pingback operations.

  16. akira01
    Member
    Posted 1 year ago #

    Hi Otto, Thank you for your time in helping me.
    I've checked my database and did a search for "pingme" and "_pingme" and can't find it in all tables.

    I normally post in real time. Meaning that I will post today and publish today.

    Anyway, sometime I may create a post first, then publish it later. Anyhow all these posts cannot receive pingback.

    Please advise. Thanks

  17. Otto42
    Moderator
    Posted 1 year ago #

    Well... Do you have this code in your theme's header.php file?

    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    You won't be able to receive pingbacks without that, because other sites won't know how to send them to you.

    When you make a post, do you have the "Allow Pings" box checked?

  18. akira01
    Member
    Posted 1 year ago #

    Hi Otto,
    Yes, the code is in header.php and by viewing page source the code will becomes <link rel="pingback" href="http://blogdemo.anthonet.com/xmlrpc.php" />

    All posts have the "Allow Pings" ticked

    I have setup a demo blog to test this pingback. You can visit here to take a look.

    Please advise. Thanks.

  19. akira01
    Member
    Posted 1 year ago #

    Any advise. Thanks in advance

Topic Closed

This topic has been closed to new replies.

About this Topic