How to fix a Permission Denial Error (Complete Details on Problem)

Discussion in 'PHP' started by airraid81, Dec 28, 2007.

  1. #1
    Moved to WordPress a few days ago. My website now gives a permission denial error everytime it's loaded: http://juicedsportsblog.com

    Here is the error:

    Warning: require(/home/mhblatt/public_html/wp-includes/compat.php) [function.require]: failed to open stream: Permission denied in /home/mhblatt/public_html/wp-settings.php on line 117

    Fatal error: require() [function.require]: Failed opening required '/home/mhblatt/public_html/wp-includes/compat.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mhblatt/public_html/wp-settings.php on line 117


    Here are some lines before and after line 117 with line 117 in bold of file WP-Settings.php:

    if ( !defined('PLUGINDIR') )
    define('PLUGINDIR', 'wp-content/plugins'); // no leading slash, no trailing slash

    require (ABSPATH . WPINC . '/ compat.php');
    require (ABSPATH . WPINC . '/functions.php');

    if ( file_exists(ABSPATH . 'wp-content/db.php') )
    require_once (ABSPATH . 'wp-content/db.php');
    else


    Got any ideas on how to fix it?
     
    airraid81, Dec 28, 2007 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    I guess this file is missing

    /home/mhblatt/public_html/wp-includes/compat.php


    Regards

    Alex
     
    kmap, Dec 28, 2007 IP
  3. temp2

    temp2 Well-Known Member

    Messages:
    1,231
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    2
    #3
    maybe you should CHMOD that file/dir
     
    temp2, Dec 28, 2007 IP
  4. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #4
    I just checked, it's there. And the permissions on both files are 777.
     
    airraid81, Dec 29, 2007 IP
  5. DarkMindZ

    DarkMindZ Guest

    Messages:
    175
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you need to edit the ABSPATH and INC folder definitions..

    wherever those are, I never used wordpress
     
    DarkMindZ, Dec 29, 2007 IP
  6. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Is ABSPATH absolute path?
     
    airraid81, Dec 29, 2007 IP
  7. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #7
    I changed some folder permissions and now I still have a white page on my domain, but the error messages disappeared. ...Whatever that means...
     
    airraid81, Dec 29, 2007 IP
  8. DarkMindZ

    DarkMindZ Guest

    Messages:
    175
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yea, ABSPATH is absolute path, and dont know what that means, but my guess is, the ABSPATH is wrong in the configs, check where its defined maybe?
     
    DarkMindZ, Dec 29, 2007 IP
  9. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #9
    Are you sure the absolute path is correct?

    I have had these probs before. You can test the path with $_SERVER['PATH_TRANSLATED']
     
    HuggyStudios, Dec 29, 2007 IP
  10. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #10
    Ya, I'm pretty sure it's correct, I just looked manually, but I don't know how to test it.
     
    airraid81, Dec 29, 2007 IP
  11. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #11
    I mean, I'm not sure ABSPATH is defined correctly, but I know that, if defined correctly, the path mentioned in wp-settings would work.

    Here is how ABSPATH appears to be defined in config:

    define('ABSPATH', dirname(__FILE__).'/');

    require_once(ABSPATH.'wp-settings.php');

    ?>

    I know they menitoned ABSPATH in wp-settings a few times before and it didn't get errors there, and they mentioned it a lot after and I didn't see errors for those lines.
     
    airraid81, Dec 29, 2007 IP
  12. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #12
    Try placing the setting in manually, instead of the dirname(__FILE__)
     
    HuggyStudios, Dec 29, 2007 IP
  13. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #13
    Okay, so should I change it to username/www/...
     
    airraid81, Dec 30, 2007 IP
  14. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #14
    The path names are all correct. The permissions are not.

    Insure that all directories are chmoded to 755 and all files to 644. Also insure that the owner/group for such files directories are public.

    Peace,
     
    Barti1987, Dec 30, 2007 IP
  15. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #15
    K, it works now, Thanks!
     
    airraid81, Dec 30, 2007 IP