Good day!
What is the most easy way to give a single php script of vhost root permissions?
I want to restart mysql by a php script:
$cmd = "sudo /var/www/vhosts/default/optimize_db.sh";
exec($cmd, $output, $retval);
echo $retval;
In optimize_db.sh i have:
service mysqld stop
/usr/bin/myisamchk -arS /var/lib/mysql/*/*.MYI
service mysqld start
Hope someone knows how to change the permissions so this is gonna work!
Thanks, Bob
What is the most easy way to give a single php script of vhost root permissions?
I want to restart mysql by a php script:
$cmd = "sudo /var/www/vhosts/default/optimize_db.sh";
exec($cmd, $output, $retval);
echo $retval;
In optimize_db.sh i have:
service mysqld stop
/usr/bin/myisamchk -arS /var/lib/mysql/*/*.MYI
service mysqld start
Hope someone knows how to change the permissions so this is gonna work!
Thanks, Bob