shell_execute(''youtube-dl') NOT WORKING .browser shows NULL. why?

816 views Asked by At

this is try.php file

<?
      echo shell_exec('youtube-dl https://yotube.com?xxxxxx');
?>

on command line php try.php gives me the following

WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
[youtube] 5Zq5wjkJ_Es: Downloading webpage
[youtube] 5Zq5wjkJ_Es: Extracting video information
[youtube] 5Zq5wjkJ_Es: Downloading DASH manifest
root@vps:/usr/bin#

but when i run on web browser

it shows enter image description here

1

There are 1 answers

0
Akash Chauhan On BEST ANSWER

ADD the following line to your shell_exec():

LD_LIBRARY_PATH=''

For Example snippet :

shell_exec("LD_LIBRARY_PATH='' youtube-dl https://yotube.com?xxxxxx");

Its a python problem. Even i had the same problem.

It will fix it