Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 24-04-2009
Members
 
Join Date: Apr 2009
Posts: 32
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
Reply With Quote
  #2  
Old 24-04-2009
Member
 
Join Date: May 2008
Posts: 2,383
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
Reply With Quote
  #3  
Old 24-04-2009
Member
 
Join Date: Jan 2009
Posts: 66
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
Reply With Quote
  #4  
Old 24-04-2009
Member
 
Join Date: Aug 2007
Posts: 1,098
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)
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Launch VLC with PHP"
Thread Thread Starter Forum Replies Last Post
HTC M7 to launch on Feb 19 Dr.Jones Web News & Trends 3 06-02-2013 05:43 PM
MTNL to launch 3G in May Ankitk India BroadBand 1 03-06-2011 04:32 AM
Quick Launch file location? My quick launch has lost it's way Toosun Dave Vista Help 7 21-11-2009 10:45 AM
Replace you Quick Launch Bar with True Launch Bar Jimmy24 Customize Desktop 3 26-03-2009 01:50 PM
I can not launch UT3 Dorota Video Games 3 20-11-2008 06:00 PM


All times are GMT +5.5. The time now is 06:53 AM.