passthru skal køre i baggrunden
Har læst mig frem til følgende:in order for it to continue running in the background, the output of the program must be redirected to a file or another output stream. Failing to do so will cause PHP to hang until the execution of the program ends.
Og jeg vil gerne køre output hen til en .txt fil.. men jeg kan ikke rigtig få det til at fungere. Siden virker til at loade imens programmet arbejder ud fra den afsendte kommando.
Min kode ser således ud:
passthru("/opt/bin/gs -dSAFER -dBATCH -dNOPAUSE -r50 -sDEVICE=png16m -sOutputFile=sample_050_%d.png sample.pdf -c quit test_output.txt");
