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.

how to get cpanel triggres external script when new account is created?

Discussion in 'General Discussion' started by AL-Kateb, Mar 22, 2010.

  1. AL-Kateb

    AL-Kateb Active Member

    Joined:
    Feb 27, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hello everybody,

    I'm changing my configuration from running php as mod_php to suphp

    i found out that open_basedir tweak is not supported in suphp. and i searched for a solution for this issue and came to believe that as it's mentioned in easy apache documentation it can be done only manually.

    so what i am doing is i added the suphp_configpath directive to point to dir where there's custom php.ini file.

    and this looks like a solution to me. but it's not 1 account that i want to change they are hundreds.

    i can write a script that changed vhosts containers in httpd.conf it's not a problem and this can copy the custom php.ini file and make the changes to it.

    but i can't do this each and every time a new account is created! this is to exhaustive.

    so what i am asking about here .. is it the right way to achieve my goal? "still make open_basedir directive effective under suphp"

    and if yes then how do i get whm to trigger a script whenever new account is created. i will write this script so it does copy php.ini and change open_basedir to point to the user's home directory so basedir restriction be in effect.

    or there's another way to do it?
    thanks in advance
     
  2. AL-Kateb

    AL-Kateb Active Member

    Joined:
    Feb 27, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    i should have noticed that cPanel will try to execute /scripts/postwwwacct if it exists

    thanks anyway
     
Loading...

Share This Page