I have a problem with a script :
When I try to do shell_exec("scanimage > /var/www/html/site/scans")
nothing happens. But if I just do echo shell_exec("scanimage -L")
, it returns the good result. User www-data is well in the scanner group.
I don't understand anything !! Please help me.
EDIT : I solved the solution by usermod -aG www-data lp
, then reboot.
Try using the backtick operator:
`scanimage > /var/www/html/site/scans`;