• Hi , when i’m entering API key , I get ” Sorry, an error occurred. ”

    cURL is installed.
    Have checked with this code
    // Define function to test
    function _is_curl_installed() {
    if (in_array (‘curl’, get_loaded_extensions())) {
    return true;
    }
    else {
    return false;
    }
    }

    // Ouput text to user based on test
    if (_is_curl_installed()) {
    echo “cURL is <span style=\”color:blue\”>installed</span> on this server<hr/>”;
    } else {
    echo “cURL is NOT <span style=\”color:red\”>installed</span> on this server<hr/>”;
    }

    https://www.ads-software.com/plugins/challonge/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author zavaboy

    (@zavaboy)

    Yeah, this problem is definitely not a cURL issue. You will get a notice after activating the plugin if you don’t have cURL installed.

    Anyway, this error indicates a failure with the JSON request when validating the API key field. This validation check will not stop you from saving your API key. Your entered API key could still work. Have you tried saving your settings anyway? If you enter [challonge] into a post or page, does it successfully load a listing of your tournaments?

    If it works, great!

    Either way, I still would like to get that validation error fixed. It could be caused by another plugin you have installed. It would help me if you could let me know which plugins you have installed and activated.

    Thanks for your feedback! ??

    Thread Starter noonsense

    (@noonsense)

    Hi thank you for your answer.
    I get “No API Key! Set one.” on [challonge] page.
    Firebug shows this response on admin page , when I’m entering the key
    RESPONSE
    <!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
    <html><head>
    <title>500 Internal Server Error</title>
    </head><body>
    <h1>Internal Server Error</h1>
    <p>The server encountered an internal error or
    misconfiguration and was unable to complete
    your request.</p>
    <p>Please contact the server administrator,
    [email protected] and inform them of the time the error occurred,
    and anything you might have done that may have
    caused the error.</p>
    <p>More information about this error may be available
    in the server error log.</p>
    </body></html>
    HEADERS
    Age
    0
    Connection
    keep-alive
    Content-Encoding
    gzip
    Content-Length
    341
    Content-Type
    text/html; charset=iso-8859-1
    Date
    Sun, 17 Apr 2016 11:10:30 GMT
    Server
    Apache
    Vary
    Accept-Encoding
    Via
    1.1 varnish-v4
    X-Varnish
    830196727
    view source
    Accept
    application/json, text/javascript, */*; q=0.01
    Accept-Encoding
    gzip, deflate
    Accept-Language
    en-GB,en;q=0.5
    Cookie
    bla bla bla, cookie hash…
    Host
    https://www.goldenesports1.com
    Referer
    https://www.goldenesports1.com/wp-admin/options-general.php?page=challonge-settings
    User-Agent
    Mozilla/5.0 (Windows NT 6.3; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
    X-Requested-With
    XMLHttpRequest

    Installed and activated plugins list
    BetPress
    Challonge
    Custom Login
    EZ SHORTCURL Shortcodes to Fetch and Parse External Content
    Fan Victor
    Fusion Core
    LayerSlider WP
    Paid Member Subscriptions
    Password Protected
    Profile Builder
    Slider Revolution
    WP-ServerInfo

    Plugin Author zavaboy

    (@zavaboy)

    I tested with most of the plugins (the free ones) you listed and everything seems to work. Seeing that it is a 500 error in the response, this could be fatal error that occurred but PHP’s display_errors setting is off.

    You have the WP-ServerInfo plugin, so you can check what display_errors is set to in the PHP information.

    If it is off, try adding the following line to challonge.php just above the require_once statement in the last several lines of the file:
    ini_set('display_errors', true);
    Now try the AJAX request again. If you see errors in the response body, let me know what they are, especially if they are from Challonge. (No need to include the HTTP headers this time.)

    Let me know what you find out and we’ll work from there. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘API key problem’ is closed to new replies.