Bonjour à tous, je fais mes debut sur linux avec mon ptit raspberry ou dessus tourne php et nginx.
depuis le terminal ce morceau de code fonctionne très bien :
J'essaye de faire la même chose depuis PHP avec ceci :Code:
1
2
3
4mkfifo /home/pi/myfifo cat > /home/pi/myfifo & cat /home/pi/myfifo | cec-client -d 1 &
Déja j'ai un time-out car le fichier (pipe) myfifo n'existe pas et la commande : 'cat '. $Path .' | cec-client -d 1 &',Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 $Path = '/var/www/myfifo'; posix_mkfifo ($Path , 0777); $TabCommande = array( 'mkfifo ' . $Path, 'cat > '. $Path .' &', 'cat '. $Path .' | cec-client -d 1 &', 'ls' ); foreach($TabCommande as $Commande){ exec($Commande, $Output); debug_r($Output, $Commande); }
déclenche le time out
Je n'ai vraiment plus d'idée et vient demander qq conseil, merci d'avance :oops:
