• Resolved CHabte

    (@chabte)


    Hi,

    I’m helping a friend update their theme (or that’s all I was attempting to do), but I noticed they were using an old version of WP and things just looked “weird” so I decided to back up her site and update it before I proceeded. I’ve run into a couple issues, such as needing her FTP password to add plugins, change themes and even do the update. But this is the biggest one.

    Once I got the other issues squared away, I attempted to update her WP and at first the page (from the admin view) and what everyone else sees gave me a scheduled maintenance message. So I just waited a few minutes and left it alone, when I came back the message I got was:

    Warning: require(D:\Hosting\12302316\html/wp-includes/random_compat/random.php) [function.require]: failed to open stream: No such file or directory in D:\Hosting\12302316\html\wp-includes\compat.php on line 338

    Fatal error: require() [function.require]: Failed opening required ‘D:\Hosting\12302316\html/wp-includes/random_compat/random.php’ (include_path=’.;C:\php\pear’) in D:\Hosting\12302316\html\wp-includes\compat.php on line 338

    I’ve seen from some other threads that other people are getting issues from updating to 4.4, except I’m not able to access the WP dashboard to deactivate plug-ins, update theme, and other suggestions. Her site is hosted with Godaddy, and I have access to the FTP files, but really don’t know much about that stuff so would prefer to leave it alone if possible. I see this error when I go to the site: supportasista.com and at supportasista.com/wp-admin

    My only relief is that I did back up her site, but I am not a “techy”. I just had a little more WP knowledge than her,and haven’t had any of these issues on my self-hosted WordPress blogs in the past…basically, I wanted to help out not potentially ruin her site.

    My questions are:

    How can I remove this message and get the site back to normal, at least on the front end for now?

    Once the issue is solved, should I attempt to update WordPress again or just leave it be? And is there anyway to avoid this in the future or is this just a bug?

    ANY help would be greatly appreciated.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Does that file exist on the system? It sounds like you performed an incomplete update, so some of the files are still missing from the server.

    Try downloading a fresh copy of the WordPress ZIP file from here, and then do the update manually, so that you know all the files are present.

    Thread Starter CHabte

    (@chabte)

    Hi Samuel,

    I’m not sure what file your referring to? Do you mean this: D:\Hosting\12302316\html/wp-includes/random_compat/random.php ?

    If so, I wouldn’t know where to look specifically. I did login to Godaddy, and saw that there’s a folder called update (under wp-content) that was modified today. When I clicked on it, the folder inside of it is called wordpress-441.tmp.

    Anyway, I will try to do the update manually as you suggested and let you know what happens. Thanks

    Thread Starter CHabte

    (@chabte)

    Got help from a WP troubleshooter on Fiverr (he was great btw). Thankfully the site is back up and running. Here’s the report he sent me:

    ####
    Begin report

    Client send a message that a error occurred after updating WordPress to the latest version.

    ## Details of the error message:

    Warning: require(D:\Hosting\12302316\html/wp-includes/random_compat/random.php) [function.require]: failed to open stream: No such file or directory in D:\Hosting\12302316\html\wp-includes\compat.php on line 338

    Fatal error: require() [function.require]: Failed opening required ‘D:\Hosting\12302316\html/wp-includes/random_compat/random.php’ (include_path=’.;C:\php\pear’) in D:\Hosting\12

    ## Analyses:
    Error message “no such file or directory in .. on line 338”

    – File content compete.php line 338 ->
    // random_int was introduced in PHP 7.0
    if ( ! function_exists( ‘random_int’ ) ) {
    require ABSPATH . WPINC . ‘/random_compat/random.php’;
    }

    # Details error message:
    random_compat offers a set of compatible functions for older versions of PHP, filling in the gap by using other PHP extensions when available. (introduced for PHP7 fallback to older versions)

    # Analyses:
    – System is running on PHP Version <= 5.4
    – Problem must be a reference to a non existing file named random.php
    – File random.php is used for the Random_* Compatibility Library for using the new PHP 7 random_* API in PHP 5 projects.

    – This file is missing on the server. Probable cause: Failed Installation or incomplete installation due to server timeout.

    – Probable justified action: Try uploading new WordPress folder and underlying files to /wp-includes

    # Action:
    – Created a complete backup of WordPress installation Supportasista. Saved to local machine for fallback.
    – Replaced wp-includes and underlying files and folders on server
    – No effect. Error message is persistent.

    ## follow up actions:
    – replace every WordPres file and subfolder except wp-content
    – outcome is positive; Site is fully functioning and running.

    # feedback:
    – Client informed that wp-admin shows a message that the WordPress database needs an upgrade.

    # Action:
    – Updated the WordPress database; received success message from WordPress
    – Site is fully functional and running

    ## Follow up action:
    – Created a complete backup of both the WordPress installation files and the MySQL database, will send these to client for save keeping.

    End report

    Hi there,

    I am really sorry to reopen this, but I think I have the same problem, started on the evening of the 10th Dec.

    I get the following when typing in my website https://www.leakheat.com

    Warning: require(/home/dgycoasf/public_html/wp-includes/random_compat/random.php): failed to open stream: No such file or directory in /home/dgycoasf/public_html/wp-includes/compat.php on line 338

    Fatal error: require(): Failed opening required ‘/home/dgycoasf/public_html/wp-includes/random_compat/random.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/dgycoasf/public_html/wp-includes/compat.php on line 338

    I am a serious no tecky, and don’t understand the fix noted above.

    I have tried restoring from a previous back up and that did not work. I cannot get access to my wordpress admin dashboard. Anyne able to assist?

    Basically CHabte just replaced his wordpress core files.
    Here’s what I would do:
    1) VERY IMPORTANT – create a backup of all files and the database.
    2) Delete all files and folders except for the folder wp-content. You will need this folder. It contains all the files for your theme and plugin.
    3) Replace all the wordpress files in the install download EXCEPT for wp-content.
    4) Update wp-config.php with your database credentials. They can be retrieved in your current wp-config.php.
    4) Test your website. If all seems well login into your admin panel and see if the database needs updated.

    I hope this helps.

    Hi dcapra211.

    Man thanks for your help. I did the above, but something went wrong so I restored the database back to pre fixing and passed it on to a website guy and he fixed it in 5 mins with the above method. So all in all its fixed and done. Thanks again.

    Chris.

    Thanks for the tips

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Warning/Fatal error after WordPress 4.4 update’ is closed to new replies.