The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WHMCS - open_basedir restriction in effect

Discussion in 'General Discussion' started by dorac, May 4, 2015.

  1. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    I can't seem to get crons to work, no errors or anything. I read to try run the cron directly in SSH and can't this. Would anyone be able to shed some light?

    Code:
    Warning: realpath(): open_basedir restriction in effect. File(/home/*/public_html) is not within the allowed path(s): (0) in /home/*/public_html/cogmin/../init.php on line 0
    
    Warning: file_exists(): open_basedir restriction in effect. File(/includes/classes/WHMCS/Init.php) is not within the allowed path(s): (0) in /home/*/public_html/cogmin/../init.php on line 0
    <div style="border: 1px dashed #cc0000;font-family:Tahoma;background-color:#FBEEEB;width:100%;padding:10px;color:#cc0000;"><strong>Down for Maintenance</strong><br>One or more required files are missing. If an install or upgrade is not currently in progress, please contact the system administrator.</div>
    
     
    #1 dorac, May 4, 2015
    Last edited by a moderator: May 4, 2015
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Thanks for fixing my post Infopro. Unfortunately, the owner of the post said he "found the docs" but no indication where or what docs.

    I'm a newbie server admin. I now tried changing the php handler from DSO + mod_ruid2 to SuPHP (had to recompile to remove the mod_ruid2) as the post you referred to also said. As soon as it went live, all my sites broke with "No input file specified." scared me so switched back, and now a few of my clients are having upload file issues - basically same error as above with "open_basedir restriction in effect". I think it would also be worthwhile mentioning I'm also using config server scripts if that may influence it in any way?

    I found https://documentation.cpanel.net/display/1144Docs/PHP+open_basedir+Tweak but I'm not sure how to use this information.

    Really sorry if it's such a newbie question.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Are you using a custom configuration where you are sharing files between multiple accounts? Note the option you are referring to is manageable via:

    "WHM Home » Security Center » PHP open_basedir Tweak"

    Thank you.
     
  5. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Thanks for the reply Michael. No, not sharing files between accounts at all. open_basedir is enabled. And after disabling it I get this on all my accounts:

    Code:
    Warning: Unknown: open_basedir restriction in effect. File(/home/onyxsacc/public_html/index.php) is not within the allowed path(s): (0) in Unknown on line 0
    
    Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
    
    Fatal error: Unknown: Failed opening required '/home/onyxsacc/public_html/index.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0
    
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Thanks Michael. No custom php, current handler is DSO with RUID2
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Is this only reproducible with WHMCS? I see you have opened a thread on the WHMCS forums, so you should receive a response to it shortly.

    Thank you.
     
  9. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    No, it occurs on website with file upload as well. I posted it to WHMCS as well in hoped to get direction sooner.

    Code:
    [05-May-2015 16:48:10 UTC] PHP Warning:  Unknown: open_basedir restriction in effect. File(/home/printfyc/public_html/index.php) is not within the allowed path(s): (0) in Unknown on line 0
    [05-May-2015 16:48:10 UTC] PHP Warning:  Unknown: failed to open stream: Operation not permitted in Unknown on line 0
    [05-May-2015 16:48:10 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/printfyc/public_html/index.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0
    [05-May-2015 16:48:11 UTC] PHP Warning:  Unknown: open_basedir restriction in effect. File(/home/printfyc/public_html/index.php) is not within the allowed path(s): (0) in Unknown on line 0
    [05-May-2015 16:48:11 UTC] PHP Warning:  Unknown: failed to open stream: Operation not permitted in Unknown on line 0
    [05-May-2015 16:48:11 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/printfyc/public_html/index.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0
    
     
  10. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    If I disable open_basedir, I get this on all of my sites.

    Code:
    Warning: Unknown: open_basedir restriction in effect. File(/home/onyxsacc/public_html/index.php) is not within the allowed path(s): (0) in Unknown on line 0
    
    Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
    
    Fatal error: Unknown: Failed opening required '/home/onyxsacc/public_html/index.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
    dorac likes this.
  12. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Already been on it, thanks Michael. I've spoken here, WHMCS, with my host that's also tried helping but they've been having serious network issues these last two days so their hands have been tied.

    6462887
     
  13. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Answer from ticket:

     
  14. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page