Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Dan Griffiths

    (@ghost1227)

    This is due to the way your server has PHP configured. I’ve got an update almost ready which will resolve this issue (taking url-file-access out of the loop completely).

    Thread Starter Tuppence

    (@tuppence)

    Hi!

    Thanks for the response. Looking forward to it!

    Regards,
    Tup.

    [email protected]

    (@minecraftnycgmailcom)

    I probably know you don’t want asked, but I am having the same issue, Is there a work around until the update, or… how soon can I expect the update ??

    Thanks

    Plugin Contributor Dan Griffiths

    (@ghost1227)

    Quick fix… edit minecraft-validator.php and find the following code:

    $mcacct = file_get_contents( 'https://www.minecraft.net/haspaid.jsp?user=' . rawurlencode( $login ) );

    Replace it with the following:

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_URL, 'https://www.minecraft.net/haspaid.jsp?user='.rawurlencode($login));
    $mcacct = curl_exec($curl);
    curl_close($curl);
    [email protected]

    (@minecraftnycgmailcom)

    It gave me this error now when I go to my home page.

    Parse error: syntax error, unexpected '=', expecting ')' in /data/23/2/92/9/2255824/user/2479171/htdocs/minecraftnyc/Forum/wp-content/plugins/minecraft-validator/minecraft-validator.php on line 50

    Here is that entire section of the code after making the change you told me to.

    /* Check account on minecraft.net */
    function verify_mc_account($login, $email, $errors) {
        $curl = curl_init();
    	curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    	curl_setopt($curl, CURLOPT_URL, 'https://www.minecraft.net/haspaid.jsp?user='.rawurlencode($login));
    	$mcacct = curl_exec($curl);
    	curl_close($curl);
        if ( $mcacct != 'true' ) {
            if ( $mcacct == 'false' ) {
                $errors->add('mc_error',__('<strong>ERROR:</strong> Minecraft account is invalid.'));
                return $errors;
            } else {
                $errors->add('mc_error',__('<strong>ERROR:</strong> Unable to contact minecraft.net.'));
                return $errors;
            }
            add_filter('registration_errors', 'verify_mc_account', 10, 3);
        }

    Anyway you could copy the text of a working file, or email it to me.

    thanks for the quick reply!

    [email protected]

    (@minecraftnycgmailcom)

    I have played with the code but no matter what changes I make it’s always line 50 that errors, I think that another piece of code it looking for something on that line… any ideas?

    Plugin Contributor Dan Griffiths

    (@ghost1227)

    This file worked for me!

    Plugin Contributor Dan Griffiths

    (@ghost1227)

    MCV has been updated to v1.3! This update fixes the aforementioned issue, as well as cleans up a LOT of unnecessary code and better handles rewriting the login page!

    Plugin Contributor Dan Griffiths

    (@ghost1227)

    Marking as resolved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Minecraft Validator] URL file-access is disabled in the server configuration’ is closed to new replies.