Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP5 and open_basedir

Discussion in 'General Discussion' started by manghooli, Sep 22, 2004.

  1. manghooli

    manghooli Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    156
    i installed PHP5 as module and active open_basedir in WHM.
    now when i look at httpd.conf, i can see lines like this:
    Code:
    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/xxxx/:/usr/lib/php:/usr/local/lib/php:/$
    </IfModule>
    but i guess it always returns FALSE and "php_admin_value open_basedir" never execute. am i right???

    thanks
     
  2. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    166
    If mod_php4.c isn't loaded it simply wont run the command within the <> </>. So, more or less what you said. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. manghooli

    manghooli Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    156
    I know that man, but i want to use open_basedir :)

    i mean that it would be something like this:
    Code:
    <IfModule mod_php5.c>
    php_admin_value open_basedir "/home/xxxx/:/usr/lib/php:/usr/local/lib/php:/$
    </IfModule>
    please pay attention to this line:
    Code:
    <IfModule mod_php5.c>
    thanks
     
    #3 manghooli, Sep 23, 2004
    Last edited: Sep 23, 2004
  4. manghooli

    manghooli Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    156
    It is a BUG!!
    is there anybody to answer me?!

    when does it fix?!
    how can we protect share hostings?!

    thanks, omid
     
    #4 manghooli, Sep 25, 2004
    Last edited: Sep 25, 2004
  5. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    166
    I haven't done any testing on php5 to see if that's what you are suppost todo. Is that module listed?

    My response was response to:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. manghooli

    manghooli Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    156
    now i test it!!!
    i installed PHP5 as module (no suexec)
    i MUST use <IfModule mod_php5.c> instead of <IfModule mod_php4.c>
    an i MUST do it on my own, CPanel put something wrong!!
     
  7. jcanals

    jcanals Registered

    Joined:
    Aug 16, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    151
    open_basedir is on file /scripts/phpopenbasectl

    If you want the php open_basedir to work with PHP 5 when adding a new domain, just edit the file /scripts/openbasectl and change the two occurences for php4 to php5

    I did that way:

    1) Deactivated the open_basedir tweak setting in WHM. (This deletes the lines for php4)
    2) Modified the file /scripts/openbasectl with the changes
    3) Activated again the open_basedir tweak setting in WHM (This creates the lines for php5)

    After that, when I create a new domain, it uses the correct <ifmodule mod_php5.c>

    I did it, and it is working. Just now I'm wondering if this tweak will continue running after the next cpanel update.

    Sorry, you have also to edit the file /scripts/wwwacct in order to get the correct <IfModule mod_php5.c> when you create a new account. The openbasectl file only is used when you activate/deactivate the setting in WHM.

    Regards,
    Jordi.
     
    #7 jcanals, Dec 19, 2004
    Last edited: Dec 19, 2004
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice