Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
PHP - youtube-dl: command not found #11967
Comments
|
Most likely $PATH is not correctly set. You may want to use absolute paths. |
|
Dare to explain a little more. I don't know. $PATH is something server side ,or in the php file? |
|
Added: |
|
putenv is the correct way, but /usr/local/bin is not enough. /usr/local/bin:/usr/bin should work I guess. |
|
Thank you ! |
|
youtube-dl install successfully |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2017.02.01. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Hello!
I'm trying to run youtube-dl via PHP. It's all working when im logged in on Terminal.
When I try to run via exec, I get this Eerror:"sh: youtube-dl: command not found"
My Php
<?php $cmd = 'youtube-dl https://www.youtube.com/watch?v=jRpp--g3oNY'; exec($cmd." 2>&1", $output); echo "<pre>"; var_dump($output); echo "</pre>"; ?>