Dynamically creating open_base dir and disable_functions

3 posts / 0 new
Last post
#1 Fri, 09/25/2009 - 05:24
Fautzi

Dynamically creating open_base dir and disable_functions

Hello i have one question can i dynamically create these tasks? I wanna when create virtual host to set up open_base dir to their home/public_html folder and disable some php func like exec,show_source etc.

I have GPL version of Virtualmin

Fri, 09/25/2009 - 08:50
andreychek

With the GPL version of Virtualmin, that would be a little tricky -- as the GPL version doesn't have any out of the box support for using or modifying individual Virtual Server php.ini files. It, by default, uses the system-wide php.ini file.

On the Pro version, which does support individual php.ini files, I think that would work by using the "PHP configuration variables for scripts" option in the Server Templates -- and if not, Jamie would probably add that :-)

To get what you want with the GPL version, you'd probably need to create a custom script to be run whenever a Virtual Server is created, which you could then add some code into that script to make the changes you're interested in.

You can set that up within System Settings -> Module Config -> Actions upon user and server creation -- and you can list the script you create to make those changes in "Command to run after making changes to a server".

-Eric

Fri, 09/25/2009 - 11:44 (Reply to #2)
Fautzi

Thanks for that

Topic locked