php execute command on server
| From: | Jody Gugelhupf | Date: | Mon, 28 May 2007 23:02:33 +0000 |
| Subject: | php execute command on server | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-255727@lists.php.net to get a copy of this message | ||
hi ppl :)
i run apache 2 on ubuntu feisty with php 5, i have website on which i have 2 links, the first is a
php which should start a vlc stream server on my server (see below), streaming from my tvcard, the
vlc command itself executed on my machine from the console shows that the command works fine, this
probably means that somehting is wrong with my php file.
the second command opens the vlc stream from the server, which works fine too
anyhow back to the first command the vlc stream server executer, i can see it in the list of the
running processes on my machine, but the stream does not work, i don't know why, either there
is
somehting wrong with my php:
<?php
// outputs the username that owns the running php/httpd process
// (on a system with the "whoami" executable in the path)
echo system('vlc
v4l:/dev/video0:norm=pal:frequency=767250:size=320x240:channel=0:adev=/dev/dsp:audio=0 --sout
\'#transcode{vcodec=mp4v,acodec=mpga,vb=3000,ab=256,vt=800000,keyint=80,deinterlace=blend}:std{access=http,mux=ts,url=10.0.0.1:8082}\'
--ttl 12 -I dummy');
?>
or does the www-data (apache) user needs special user permissions to access the devices
/dev/video0 /dev/dsp ? i have no clue, is there a way to see some output? thx for the help :)
katie
Get news delivered with the All new Yahoo! Mail. Enjoy RSS feeds right on your Mail page.
Start today at http://mrd.mail.yahoo.com/try_beta?.intl=ca