-
Launch VLC with PHP
hi
I am trying to launch VLC with PHP, but still I get the answer:
Xlib: connection to ": 0.0" refused by server
Xlib: No protocol specified
Error: Unable to initialize gtk, is DISPLAY set properly?
I try first with a terminal
Indeed, since the current session is not that of the user www-data used by Apache, which is a "fake user" ...
What could I do?
Thank you
-
Re: Launch VLC with PHP
So, by running the command vlc - help - advanced is the parameter-d, - daemon running vlc as a daemon / service.
It must use the correct function php, proc_open () to start the process and proc_close () to close it.
This is a fairly complicated then search on the Internet because you're not the first to launch
-
Re: Launch VLC with PHP
I would like PHP coded interface with my server to read me a playlist. (Basically, I use my laptop as big remote haha!)
In short, over the small command: vlc-d montitre.mp3, it works very well. But no way to run the command with PHP: s
At the beginning I tried with exec () and popen () or proc_open (), but I can not ...
Someone would have an indication to give me please? Thank you
-
Re: Launch VLC with PHP
Hello, I have solved the problem ... In fact, it should be granted the necessary rights on audio device / dev / dsp ... I put (as a pig!) Rights 0777, and since it works in : c)
In summary, I:
Laptop <--- Wifi ---> Server --- Jack ---> Channel
So I coded a little bit of PHP to launch playlists: c)
Page generated in 1,714,179,252.03659 seconds with 10 queries