• I’m trying to log in to my wordpress site, but I’m getting the below error after entering the password.

    ?>
    Fatal error: Call to undefined function random_int() in D:\xxx.co.uk\wwwroot\wp-includes\pluggable.php on line 2146

    The relevant lines are below, line 2146 is $val = random_int( $_min, $_max );

    Any ideas how to fix it?

    // wp_rand() can accept arguments in either order, PHP cannot.
    $_max = max( $min, $_max );
    $_min = min( $min, $_max );
    $val = random_int( $_min, $_max );
    if ( false !== $val ) {
    return absint( $val );
    } else {

    • This topic was modified 8 years, 5 months ago by ChrisStoneman.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    random_int is a PHP version 7 function. You have a plugin or theme that does not fail gracefully with earlier versions of PHP.

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    If you don’t have admin access, you can disable plugins by renaming their directory from wp-content/plugins/theplugin to wp-content/plugins/theplugin.xxx. Use FTP or your hosting control panel to do the renaming.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Update: WP should handle this; it appears you do not have a complete WP installation. Go to www.remarpro.com, download a new copy, unzip locally, and then upload the files and directories to your site via FTP.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error: Call to undefined function random_int() in … pluggable.php’ is closed to new replies.