I have a VPS (CentOS) with CPanel and Suphp enabled. Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.5
As a root I created an account and set up a domain for it. Now I can login to this account's CPanel and create addon domains. For my project I want to allow the visitors of my website to do same thing (create addon domains) from my PHP script.
I guess it's impossible with PHP only, since it requires changing config files which PHP probably has no right to do and I don't know if it's possible to obtain the necessary privileges for the PHP process. I suspect I have to create a command file and use system() or similar PHP function to call it. But again I'm not sure how to give this command file enough rights. Maybe there can be some user switch commands and then the necessary stuff to change config files... Please advise.
Thank you.