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.

blank page all websites with open_basedir

Discussion in 'General Discussion' started by YasIT, May 2, 2014.

  1. YasIT

    YasIT Active Member

    Joined:
    Jan 3, 2014
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello,
    I was set the open_basedir = /home/:/usr/lib/php:/usr/local/lib/php:/tmp
    but all sites blank page.
    handler php : suphp
    Enable php open_basedir Protection with Home »Security Center »PHP open_basedir Tweak.
    php.ini disable for all users.
    shared hosting..
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. YasIT

    YasIT Active Member

    Joined:
    Jan 3, 2014
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    i turn on display_errors and show errors in the page :

    Warning: Unknown: open_basedir restriction in effect. File(/home2/username/public_html/whmcs/cart.php) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

    Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0

    Warning: Unknown: open_basedir restriction in effect. File(/home2/username/public_html/whmcs/cart.php) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp) 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 '/home2/username/public_html/whmcs/cart.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0

    Some sites are white, some are not.
     
  4. YasIT

    YasIT Active Member

    Joined:
    Jan 3, 2014
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    php 5.3.27
     
  5. iserversupport

    iserversupport Well-Known Member

    Joined:
    Nov 4, 2013
    Messages:
    91
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Root Administrator
    You can disable open_basedir from "WHM » Home »Security Center »PHP open_basedir Tweak" for that particular user. Or you can allow specified URL using php.ini

    Hope this will help
     
  6. YasIT

    YasIT Active Member

    Joined:
    Jan 3, 2014
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    open_basedir output for users should be like this.
    /home/*user*:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp
    What is the value of php.ini I enter?
     
  7. YasIT

    YasIT Active Member

    Joined:
    Jan 3, 2014
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    some sites in /home2 show blank page....
    fix by :

    /home/:/usr/lib/php:/usr/local/lib/php:/tmp:/home2/:/usr/lib/php:/usr/local/lib/php:/tmp:/home3/:/usr/lib/php:/usr/local/lib/php:/tmp:/home4/:/usr/lib/php:/usr/local/lib/php:/tmp

    Thanks you.
     
  8. Evolve

    Evolve Well-Known Member

    Joined:
    Jan 31, 2007
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    I believe I am having a related problem... or misunderstanding.

    I was getting the blank pages with an error of "No input file specified." and since I recently added a new drive "home2" adding the /home2/:/usr/lib/php:/usr/local/lib/php:/tmp seemed to remedy that. Thanks.

    My problem though was that I noticing that the default PHP settings I had through the PHP Configuration Editor weren't taking effect and this was reinforced by viewing phpinfo(). I had specifically set "display_errors" to "Off" in the editor and when there wasn't a php file put in the user's directory it was loading my default settings. As soon as I added a user specific php.ini file, which didn't change the display_errors setting, it changed the display_errors setting to be On for both Local and Master.

    Aren't the master php settings made in the configuration editor inherited by the user made ones unless they are overwritten?
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, that is true for most configuration options, but not all. To clarify, are you stating the php.ini file within the account is changing the global php.ini settings for all other accounts?

    Thank you.
     
  10. Evolve

    Evolve Well-Known Member

    Joined:
    Jan 31, 2007
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    No just for that account however it's changing settings that it isn't even attempting to change. As soon as I add a user php.ini it appears to ignore any of the settings in the master php.ini.

    It must be pulling those default settings from a new file as soon as I add a user php.ini file. For example when I add a user php.ini it changes memory_limit to 128M which is not what is set in either my master (64M) or my user (not set) php.ini files. Where is it getting 128M from?

    Thanks
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  12. Evolve

    Evolve Well-Known Member

    Joined:
    Jan 31, 2007
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    So I am to understand that this is the expected result from using suPHP?
    The PHP Configuration Editor settings are rendered useless as soon as you add a php.ini file in a user's directory?
    There is no way to set default settings for all accounts that can be overridden on a per account basis without entering every single setting in my php for each and every account?
    That doesn't seem very intuitive.
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I believe we could provide a more accurate answer if we were able to review your existing setup and see what's happening. Could you open a support ticket so we can take a closer look? You can provider the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  14. Evolve

    Evolve Well-Known Member

    Joined:
    Jan 31, 2007
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Ticket Number 5107923

    Thanks!
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To update, here is a snippet of the response from the analyst on the ticket:

    Thanks.
     
  16. Evolve

    Evolve Well-Known Member

    Joined:
    Jan 31, 2007
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Just as a follow up:

    The previous poster said to use:
    /home/:/usr/lib/php:/usr/local/lib/php:/tmp:/home2/:/usr/lib/php:/usr/local/lib/php:/tmp:/home3/:/usr/lib/php:/usr/local/lib/php:/tmp:/home4/:/usr/lib/php:/usr/local/lib/php:/tmp


    Can it just be simplified down to: /home/:/usr/lib/php:/usr/local/lib/php:/tmp:/home2/:/home3/:/home4/
    It seems like some of it is just repeated or am I confused about the colon being a separator?
     
Loading...

Share This Page