Well I read from PHP.net that this can be accomplished with php's shell_exec($command) function:
http://php.net/manual/en/function.shell-exec.php
The idea is that a future version of my script will need a PECL extension called runkit(perfect for making plugins that dynamically add controller action methods), but users of my script may be on webhosts that do not have this extension pre-installed. This can be a problem, I am pretty sure more than 95% of them dont know how to install a PHP extension with PECL or PEAR even if their webhosts provide such an option. For this reason I am attempting to carry this out through my script's installer, which not only install/configure the database tables, but also the necessary PHP extensions required to run the script.
So the question is, is this possible? I am sure with Dedicated host and VPS it should not have any issues, but how about shared hosts and even free hosts? Will the function shell_exec($command) actually work(as the sample code I'm showing below)? Or will it get blocked by the webhosts? Thx.
<?php
$command = "sudo pecl install https://github.com/downloads/zenovich/runkit/runkit-1.0.3.tgz";
shell_exec($command);
?>