I am currently developing a website from HTML in order to control a relays on a USB Relay Board connected to a Raspberry Pi. I am running Apache and PHP.
The sequences is thus: I press a button on the website which runs a PHP file which then runs a Bash script, which then runs a command in the /home/pi directory
. If I attempt to run the PHP file on its own, it will run without a problem and control one of the relays.
If I attempt to run a "hello world" php file (echo "hello world"), I see the hello world on the webpage. If I press the button, it redirects the page after running the php file like it should, but the relay doesn't respond. I've also restarted the RPi.
I've done this once before with a different system, but similar equipment, and it worked without an issue.