Hi All,
I was trying to execute some root linux command using PHP but i found that from html folder i cannot execute all linux command. I have my Asterisk running on the Same Server, i wanted to check it from web browser using PHP if asterisk not working the system function of PHP will start my asterisk.
But i think i cannot run full command from PHP uising web browser. here is the code which i was trying to run.
<?php
echo '<pre>';
$last_line = system('asterisk', '-rx', $retval");
echo '
</pre>
<hr />Last line of the output: ' . $last_line . '
<hr />Return value: ' . $retval;
?>
Can anyone help me how i can give this file for root command permission?
Also i fingure php.ini file but still i am not able to run the command. Here is what i did in php.ini.
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir = /usr/sbin/asterisk
safe_mode_exec_dir = /var/www/html/asterisk/gui
safe_mode_allowed_env_vars = /usr/sbin/asterisk
Thank You