php - exec() is not working -


i doing conversion youtube link gif image ,but faced problem while executing exce() function.

 echo  $ret = exec("youtube-to-gif -u https://www.youtube.com/watch?v={$vidid} -b $start_second -d $different_second -s 480x? -o {$filepath}{$filename} -f 10", $out, $err); 

i using exec() ,but not returning value .here not getting why not working.

thanks ,any suggestion highly appreciate.

first, store command in variable , try echoing , runnining in terminal see if it's valid @ all:

$command = "youtube-to-gif -u https://www.youtube.com/watch?v={$vidid} -b $start_second -d $different_second -s 480x? -o {$filepath}{$filename} -f 10"; echo $command . php_eol; echo  $ret = exec($command, $out, $err) . php_eol; 

if works fine when run manually, try full path youtube-to-gif. assuming running php on linux, should able command:

which youtube-to-gif 

now replace youtube-to-gif full path in $command.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -