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 exec can't run it #69
Comments
|
Who knows? "It doesn't run" couldn't be less specific. I doubt this is a problem with youtube-dl, though, so I'm closing the issue.
|
|
I think it's important. |
|
You'd need to provide much more information if you want any type of help, like the exit status of the command, the standard output, standard error... I know for a fact many people use youtube-dl from PHP, so it's probably a mistake you're making. I'm not an expert in PHP at all. |
|
I would give you more info but please write how I should do this. When I do this: passthru('youtube-dl -h > log.txt'); I get empty log.txt file When I run as root passthru('sudo -u root youtube-dl -h > log.txt'); I get all the help as it should give. So when I run this script as user 'nobody' which is default apache user it just gives no error, nothing. Is not executed at all. It's very strange coz other python script I can run without any problems as nobody. Thats why I thought it's maybe not a bug but something which can save time to others later. |
|
There are no "Linux commands", or shell commands, in youtube-dl. I don't know how to help you here other than checking the basics like file path, permissions, owner, etc. |
|
Ok, with sudo I can use it without any problems so if anybody find the same problem - USE SUDO ! thanks for your answers. |
|
Bad advice, IMHO, but whatever floats your boat. |
so i wrote some simple python script to check it with exec('python26 simple.py') and it runs without problems, however when i try exec('python26 youtube-dl') it doesn' run.
when i run my script on shell from command line it runs. when i do that from the browser it is not runned.
why?