My problem is, that the following script executes in the terminal fine but on my Apache2-Webserver it doesn't do anything.
<?php
exec("/usr/bin/pactl set-sink-volume 0 60%");
?>
I can hear the music getting louder, when its executed from the terminal using
sudo php /var/www/html/test2.php
Other commands with exec work perfectly fine on the webserver. Working example:
<?php
exec("/sbin/shutdown -r now");
?>
Setup:
- Apache 2.4
- PHP 7
- Raspberry Pi 3b+
- Raspian
- Speaker connected via Headphone Jack
Thanks for any help in advance!