Skip to content

PHP exec() not grabbing output from bash command

i’m trying to get the ouput from a bash command. If I execute the some command directly in the bash, i see the result. But not with PHP exec() function.. This command try to get a video resolution using ffmpeg lib. The video path it’s fine, I triple check that. Thanks! EDIT: screenshot from the ou…

run shell script from php as a specified user

I am trying to run a shell script from a PHP script. PHP code : my shell script : After I run the PHP code in a web server (Xampp), I got this output : Although, I haven’t set any password for the daemon user. And after I checked the current user running the PHP code I found it is

Overwriting TS Stream File with FFMPEG in Linux

I’m trying to convert rtmp streams to m3u8 stream. To reach that aim I use FFMPEG. Now, there is no problem with converting and downloading. However, it writes lots of .ts file such as channel0000.ts,channel0001.ts,channel0002.ts. Per every 10 seconds, 1 ts file is created. In this point, I want a singl…

How does `ip netns exec` command create mount namespace?

How does ip netns exec command create a mount namespace and prevent the changes from being propagated to other mount namespaces? Following is the from the man page of ip-netns: For applications that are aware of network namespaces, the convention is to look for global network configuration files first in /etc…